In SampleApp,the coordinator can use osal_mem_alloc to obtain about 2048B while the enddevice can use osal_mem_alloc to obtain about 1024B.
why the coordinator obtained more mem than the enddevice? i am so confused.
i use the code to test:
while(1)
{
char *p=NULL;
p=osal_mem_alloc(512);
if(p==NULL)
SystemReset();
else
iLen+=512;
}
Then I have a look at the file SampleApp.map
why the coordinator obtained more mem than the enddevice? i am so confused.
i use the code to test:
while(1)
{
char *p=NULL;
p=osal_mem_alloc(512);
if(p==NULL)
SystemReset();
else
iLen+=512;
}
Then I have a look at the file SampleApp.map
CoorinatorEB-Pro:
133 561 bytes of CODE memory
26 bytes of DATA memory (+ 87 absolute )
6 895 bytes of XDATA memory
192 bytes of IDATA memory
8 bits of BIT memory
943 bytes of CONST memory
133 561 bytes of CODE memory
26 bytes of DATA memory (+ 87 absolute )
6 895 bytes of XDATA memory
192 bytes of IDATA memory
8 bits of BIT memory
943 bytes of CONST memory
EndDeviceEB-Pro:
116 972 bytes of CODE memory
26 bytes of DATA memory (+ 87 absolute )
5 442 bytes of XDATA memory
192 bytes of IDATA memory
8 bits of BIT memory
879 bytes of CONST memory
with CoorinatorEB-Pro, the 6 895 bytes of XDATA memory have been used by system ,so left to the app will be 8192-6895=1297B
with EndDeviceEB-Pro, the 5442 bytes of XDATA memory have been used by system ,so left to the app will be 8192-5442=2750B
Why is not consistent with the above?