Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is the heap size in TMS linker command?

Status
Not open for further replies.

mhamed

Advanced Member level 4
Joined
Jul 28, 2004
Messages
114
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,298
Activity points
827
TMS linker quetion

Hi
can any one explain the blow sentence. it is a description for -heap option of linker command of TMS320c3x/4x i cannot understand what this option does?

Set heap size (for the C memory pool command malloc()) to size words
and define the global symbol _SYSMEM_SIZE to specify heap size.
Default = 1K words

what is heap size ?
 

Re: TMS linker quetion

Hello mhamed

Heap is the arrea of the memory reserved for dynamic memory allocation.
It means that run-time you may decide to allocate 10 bytes of ram so you
have something like


int *PointerToDynnamicMemory, bytes;
bytes=10;
PointerToDynnamicMemory=malloc(bytes);
....
free(PointerToDynnamicMemory)


Function malloc search for the RAM block in the previously reserved arrea (called HEAP) create small header at the begining of each allocated memory block(with size of the block and the next block, mark free/allocated). Using this headers malloc can search the heap for the free block with size bigger than the user requests and to separete this block into allocated and free part ... You can check the code of the malloc for details (the c cource is included for the rts55.lib as rts55.src or something ....)

Note that the HEAP shoulc not cross the page boundary ... otherwise you will have problems!

Best regards
dora
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top