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 -
Assertion at Line no: 419 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-syslink-2_00_05_85-r4i/syslink_2_00_05_85/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/MessageQDrv.c: (cargs.args.create.handle != NULL) : failed Assertion at Line no: 419 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-syslink-2_00_05_85-r4i/syslink_2_00_05_85/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/MessageQDrv.c: (cargs.args.create.handle != NULL) : failed Assertion at Line no: 419 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-linux-gnueabi/ti-syslink-2_00_05_85-r4i/syslink_2_00_05_85/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/MessageQDrv.c: (cargs.args.create.handle != NULL) : failed Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed Assertion at Line no: 700 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed Assertion at Line no: 700 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed Assertion at Line no: 700 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed Assertion at Line no: 700 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed Assertion at Line no: 700 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe Assertion at Line no: 1244 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed ServiceMgr_rxThreadFxn: bind() failed with errno = 98 Assertion at Line no: 766 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed
- 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 -
Assertion at Line no: 1081 in /home/krunal/release_014/ezsdk_504/component-sources/syslink_2_00_05_85/packages/ti/syslink/ipc/hlos/usr/SharedRegion.c: (id < SharedRegion_module->cfg.numEntries) : failed
- 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