This is the mail archive of the ecos-discuss@sourceware.org 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]

Two minor memory allocation issues


I've just been experimenting with memory allocation (malloc and friends) on eCos and have spotted two minor issues:

1. A malloc request for 0x7FFFFFFF bytes succeeds and allocates a small amount of memory. Reducing the request to 0x7FFFFFF0 causes it to fail as expected. My guess is that this is a function of the allocation padding calculation, but I haven't got time at present to investigate further.

2. In the reference manual section 'eCos Memory Pools' on the page for 'stdlib malloc Pools, the prototype for calloc is given as:

void *calloc(size_t size);

but looking in stdlib.h it appears that it should be:

void *calloc(size_t nmemb, size_t size);

Andy..



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


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