Hi,
I am trying to allocate shared memory from IPC_SR_FRAME_BUFFERS region. I am able to do it with single process but I want to allocate memory from two separate process at the same time.
Below is the scenario and its behavior (I hope I will be able to explain it clearly) . I created two sample application to minimize the scope:
- Sample Application-1 (Process-1) : which does following:
- Init OMX using OMX_Init();
- Allocate heap using SharedRegion_getHeap()
- Allocate buffer using Memory_alloc()
- Wait infinite using while (1)
- Deinit OMX
- Sample Application-2 (Process-2) : which does following:
- Allocate heap using SharedRegion_getHeap()
- Allocate buffer using Memory_alloc()
Scenario-1
- Run Sample Application-1 in background - Memory allocated successfully.
- Again Run Sample Application-1 - OMX Failed to initialize and gives errors - Attached log - 7230.scenario-1_omx_init_errors.txt
- Query: Does OMXInit is can be done only once? Isn't it re-entrant?
Scenario-2
- Run Sample Application-1 in background - Memory allocated successfully.
- Run Sample Application-2 - Allocation failed with error - Attached log - 1258.scenario-2_memory_allocation_failed.txt
- Query: Is it necessary to call OMXInit() before memory allocation from SharedRegion? Should both OMXInit() and Shared region allocation be done from same process context ?
Query:
How can I allocate memory from shared region when the OMXInit() is done from separate process?
Any help will be highly appreciated.!
Regards,
Krunal