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.

协议栈中INT_HEAP_LEN应如何设置?

Other Parts Discussed in Thread: CC2530, CC2538

现在在zstack home 1.2.2a中默认的INT_HEAP_LEN设置在路由器和协调器中都是3072,占用了很多ram,我们现在需要1K左右的ram空间作为缓存,想改动一下INT_HEAP_LEN的大小,请问INT_HEAP_LEN有什么设置的规则吗?谢谢!

  • // Internal (MCU) heap size

    #if !defined( INT_HEAP_LEN )

    #if defined( ZDO_COORDINATOR )

    #define INT_HEAP_LEN 4096

    #elif defined( RTR_NWK )

    #define INT_HEAP_LEN 3072

    #else

    #define INT_HEAP_LEN 1664

    #endif

    #endif

    // Memory Allocation Heap

    #define MAXMEMHEAP INT_HEAP_LEN // Typically, 0.70-1.50K

  • Viki Shi :

    我看到zstack home 1.2.2a中默认定义如下

    /* The following Heap sizes are setup for typical TI sample applications,  * and should be adjusted to your systems requirements.  */

    #if !defined INT_HEAP_LEN

    #if defined RTR_NWK  

    #define INT_HEAP_LEN  3072

    #else 

     #define INT_HEAP_LEN  2048

    #endif 

     #endif

    用这个默认的定义,路由器和协调器中的Ram都会被被占用3072字节,如果按照您设置的,协调器占用4096,路由器占用3072字节,我使用的是CC2530,协调器剩余的Ram空间更少了,这样就没法设计自己的应用了,即使网络再稳定也没有意义了,希望能给提供一个好的解决方法,谢谢!

  • INT_HEAP_LEN可以改小的,前提是你得知道哪些功能不用,这部分不用功能的占用空间可以划出去

  • 考虑一下使用CC2538做协调器。

  • 前提是你得知道哪些功能不用  ????


    我应用程序上的基本都去除了,但是还是不够!!!!

    如果我将INT_HEAP_LEN 改小,那么对于 实际的router 性能上是那部分降低了呢??