21161的内存分配方法在visualdsp 5 中的改变
来源:互联网 发布:2.4ghz是什么意思网络 编辑:程序博客网 时间:2024/06/06 09:44
在之前的版本中,如v3.5,栈和堆是在ldf中独立分配的。在v 5中,为了更有效的利用内存,会在连接时变大以利用所有剩余的空间。
默认的堆栈大小是8K,可以在下面第一句改变大小,以增加dmda实际可用内存。
seg_dmda
{
RESERVE(heaps_and_stack, heaps_and_stack_length = 8K, 2)
INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))
RESERVE_EXPAND(heaps_and_stack, heaps_and_stack_length, 0, 2)
ldf_stack_space = heaps_and_stack;
ldf_stack_end = (ldf_stack_space + ((heaps_and_stack_length * 6K) / 8K) - 2) & 0xfffffffe;
ldf_stack_length = ldf_stack_end - ldf_stack_space;
ldf_heap_space = ldf_stack_end + 2;
ldf_heap_end = ldf_heap_space + ((heaps_and_stack_length * 2K) / 8K) - 2;
ldf_heap_length = ldf_heap_end - ldf_heap_space;
} >seg_dmda
Memory Allocation for Stack and Heap on ADSP-2106x, 2116x and 2126x Processors
In previous releases of VisualDSP++, the default stack and heap were allocated separate memory sections in the LDFs. In VisualDSP++ 5.0, for ADSP-210xx, 2116x and 2126x processors, the allocation of memory for stacks and heaps is performed by the linker at link-time, resulting in more efficient memory use. (For ADSP-213xx processors, the stack and heap allocation remains the same because of the increased number of memory blocks.)
The memory for the stack and heap is allocated as follows:
- An area of memory in one of the default memory areas (for example, seg_dmda) is reserved for the stack and heap, using the RESERVE() command.
- Memory is allocated to data that must be placed in this section (for example, global variables and static variables).
- The RESERVE_EXPAND() command is used to claim any unused space in the default memory area and allocate it to the stack and heap. The ratio of memory allocated to the stack and heap can be adjusted if necessary.
- 21161的内存分配方法在visualdsp 5 中的改变
- 在栈中分配内存的方法 alloca 例子
- 分配内存的方法总结
- java的内存分配方法
- 进程在混合内存中的分配策略
- const在C++中的内存分配
- 在JVM中的String内存分配
- C++中的const的内存分配问题
- C++中的内存分配的问题
- new分配的内存一定在堆上么?
- C++内存分配的五种方法
- C++内存分配的五种方法
- 结构体的内存分配方法
- C++内存分配的五种方法
- 类的方法使用和内存分配
- 增加MyEclipse分配内存的方法
- 内核分配大块连续内存的方法
- java方法体的变量内存分配
- MSSQL2008安装失败的解决方案
- 新手站长个人经验谈几点SEO优化技巧
- extern
- HTTP协议详解
- 服务器禁止某IP进行访问
- 21161的内存分配方法在visualdsp 5 中的改变
- LED照明已经到来!
- 夜难眠
- 使用TOMCAT5.5连接池连接mysql(解决Cannot create JDBC driver of class '' for connect URL 'null')
- 基于WaveX低级音频函数的实时语音通信
- WAP开发工具
- TargetType 属性 (Property) 和 x:Key 属性 (Attribute) 的关系
- tomcat启动时OutOfMemoryError
- Mysql 自增长AUTO_INCREMENT属性