mem_management
所属分类:DSP编程
开发工具:Visual C++
文件大小:110KB
下载次数:7
上传日期:2015-07-26 17:13:07
上 传 者:
fu1899
说明: TI公司C6000的DSP BIOS 内存管理例程,对做TI C6000开发有特别重要的作用
(C6000 DSP BIOS TI memory management routines, the development of the C6000 TI to do a particularly important role)
文件列表:
mem_management\dsk5416\makefile (2469, 2006-11-15)
mem_management\dsk5416\mem_management.pjt (1529, 2006-11-15)
mem_management\dsk5416\mem_management.tcf (907, 2006-11-15)
mem_management\dsk5416\mem_managementcfg.cmd (9460, 2006-11-15)
mem_management\dsk5510\makefile (2445, 2006-11-15)
mem_management\dsk5510\mem_management.pjt (1491, 2006-11-15)
mem_management\dsk5510\mem_management.tcf (907, 2006-11-15)
mem_management\dsk5510\mem_managementcfg.cmd (9780, 2006-11-15)
mem_management\dsk6416\makefile (2453, 2006-11-15)
mem_management\dsk6416\mem_management.pjt (1495, 2006-11-15)
mem_management\dsk6416\mem_management.tcf (907, 2006-11-15)
mem_management\dsk6416\mem_managementcfg.cmd (7824, 2006-11-15)
mem_management\dsk6455\makefile (2455, 2006-11-15)
mem_management\dsk6455\mem_management.CS_\FILE.CDX (3072, 2013-06-05)
mem_management\dsk6455\mem_management.CS_\FILE.DBF (352, 2013-06-05)
mem_management\dsk6455\mem_management.CS_\FILE.FPT (827, 2013-06-05)
mem_management\dsk6455\mem_management.CS_\SYMBOL.CDX (23552, 2013-06-05)
mem_management\dsk6455\mem_management.CS_\SYMBOL.DBF (10261, 2013-06-05)
mem_management\dsk6455\mem_management.CS_\SYMBOL.FPT (16340, 2013-06-05)
mem_management\dsk6455\mem_management.paf2 (1108, 2013-06-05)
mem_management\dsk6455\mem_management.pjt (1498, 2006-11-15)
mem_management\dsk6455\mem_management.sbl (2545, 2013-06-05)
mem_management\dsk6455\mem_management.tcf (907, 2006-11-15)
mem_management\dsk6455\mem_management.tco (421, 2013-06-05)
mem_management\dsk6455\mem_managementcfg.cmd (10692, 2006-11-15)
mem_management\dsk6713\makefile (2453, 2006-11-15)
mem_management\dsk6713\mem_management.pjt (1493, 2006-11-15)
mem_management\dsk6713\mem_management.tcf (907, 2006-11-15)
mem_management\dsk6713\mem_managementcfg.cmd (7908, 2006-11-15)
mem_management\evm5509A\makefile (2446, 2006-11-15)
mem_management\evm5509A\mem_management.pjt (1492, 2006-11-15)
mem_management\evm5509A\mem_management.tcf (911, 2006-11-15)
mem_management\evm5509A\mem_managementcfg.cmd (9623, 2006-11-15)
mem_management\evmDM642\makefile (2454, 2006-11-15)
mem_management\evmDM642\mem_management.pjt (1496, 2006-11-15)
mem_management\evmDM642\mem_management.tcf (911, 2006-11-15)
mem_management\evmDM642\mem_managementcfg.cmd (7823, 2006-11-15)
mem_management\evmDM6437\makefile (2457, 2006-11-15)
mem_management\evmDM6437\mem_management.pjt (1500, 2006-11-15)
mem_management\evmDM6437\mem_management.tcf (915, 2006-11-15)
... ...
Purpose:
This example demonstrates basic DSP/BIOS memory operations by using
the MEM_alloc() and MEM_free() functions. These functions are used to
dynamically allocate and free memory in a DSP/BIOS memory segment that has been
defined in the program's configuration.
Design:
This example uses a DSP/BIOS TSK object, initTsk, to perform its memory
operations. The function initTask() is called when the TSK object initTsk is
run. The initTask() function creates an array of pointers, each of which is
assigned a block of memory that is returned by MEM_alloc(). After the memory
is allocated, it is then freed via MEM_free(). It is important to note that
all memory that is dynamically allocated must be freed (once it is no longer
needed) by calling MEM_free(). It is the programmer's responsibility to free up
dynamically allocated memory, and if this is not done properly, the program may
crash due to memory leaks.
Expected output:
The output of this program can be seen by opening the DSP/BIOS Message Log.
Once the program is run, the message log will display the string
"mem_management example started." This is followed by some information about
state of the memory segment SEG0 before allocation, after allocation, and after
freeing. The program will print out the number of Minimum Adressable Units
(MADUs) currently being used and the size of the largest free memory block.
These values are printed before calls to MEM_alloc(), after calls to
MEM_alloc(), and after calls to MEM_free(). Notice that after the MEM_alloc()
calls, the number of MADUs available increases by 0x100 (the size of BUFSIZE *
NALLOCS hexadecimal) and the size of available memory decreases by 0x100.
Note also that after the calls to MEM_free(), the number of MADUs
and size of free memory return to their original values.
近期下载者:
相关文件:
收藏者: