This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8168: Problem with memory allocation from SharedRegion

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:
  1. Init OMX using OMX_Init();
  2. Allocate heap using SharedRegion_getHeap()
  3. Allocate buffer using Memory_alloc()
  4. Wait infinite using while (1)
  5. Deinit OMX
  • Sample Application-2 (Process-2) : which does following:
  1. Allocate heap using SharedRegion_getHeap()
  2. Allocate buffer using Memory_alloc()

Scenario-1

  1. Run Sample Application-1 in background - Memory allocated successfully.
  2. 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

  1. Run Sample Application-1 in background - Memory allocated successfully.
  2. 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