This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bss and heap


Tom Coremans wrote:
> 
> Hi,
> 
> here is a section out of the a header file for the memory layout for the
> ipaq pocket PC target.
> 
> SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
> CYG_LABEL_DEFN(__heap1) = ALIGN (0x1000);
> 
> It defines a heap and a bss of about 4k.

Nope, it's a BSS aligned to 4 bytes, and heap aligned to 4K. :-)
 
> What is the exact difference between the two?
> The heap is used for all the memory allocation (malloc etc.) so for what
> is the bss used in ecos?

Uninitialized data (which gets set to 0). For static and global variables
for example.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]