This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Memory allocation failure
- From: Edgar Grimberg <edgar dot grimberg at rms dot ro>
- To: David Brennan <eCos at brennanhome dot com>
- Cc: eCos Discussion List <ecos-discuss at sources dot redhat dot com>
- Date: Sat, 07 May 2005 12:16:30 +0300
- Subject: Re: [ECOS] Memory allocation failure
- References: <427B77BF.5010302@brennanhome.com>
A total guess here, also...
This happened to me not a long time ago.. I have wrote way over the
memory I have allocated with malloc (I am still ashamed) and, after some
steps, when trying to create another object, operator new returned me a
big fat NULL. Of course, the problem was caused by my array index out of
bound type of bug.
How to check if this is your problem... try using ||struct mallinfo
mallinfo|(void);
(http://ecos.sourceware.org/docs-latest/ref/malloc-pools.html) and
check the free memory. If you see something strange there... you must
check if you don't get over your allocated memory.
Good luck,
Edgar||||
|
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss