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.

Why EndDeviceEB left app less mem than CoorinatorEB?



 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
 
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
 

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

that meas as follows,
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?
  • End device is RFD (redouce function device). pls refer to below.

    •Does not:
    –route messages
    –own or start network
    –allow other devices to join it
    Did you notice below define in Onboard.h?
    #if !defined INT_HEAP_LEN
    #if defined RTR_NWK
      #define INT_HEAP_LEN  3072
    #else
      #define INT_HEAP_LEN  2048
    #endif