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有什么设置的规则吗?谢谢!
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.
// 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空间更少了,这样就没法设计自己的应用了,即使网络再稳定也没有意义了,希望能给提供一个好的解决方法,谢谢!