按照附件的方式生成IPC的notify例程后。看了一下cfg文件的source。
/* To avoid wasting shared memory for MessageQ transports */
for (var i = 0; i < MultiProc.numProcessors; i++) {
Ipc.setEntryMeta({
remoteProcId: i,
setupMessageQ: false,
});
}
/* Shared Memory base address and length */
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
/*
* Need to define the shared region. The IPC modules use this
* to make portable pointers. All processors need to add this
* call with their base address of the shared memory region.
* If the processor cannot access the memory, do not add it.
*/
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2_RAM",
});
仅仅一个notify功能就要占用2MB的MSMCSRAM?尝试把SHAREDMEMSIZE改为0x00000100,就不能正确运行。
notify使用这么多sharedregion干什么用?这样的话应用程序可用的资源就不足了。
另外,缺省BIOS.heapSize = 32768,尝试改小些也会使得运行出错。难道一个简单的notify就要占用这么多资源?
请专家解惑,能否优化些?