RTEMS malloc crash.

Ian Caddy ianc at goanna.iinet.net.au
Wed Feb 4 01:09:48 UTC 2009

Nick Thomas wrote:
> Hi,
> What would cause a call to malloc to crash in RTEMS?
> I presume that I am out of heap memory because my code calls malloc a few
> times before it crashes.
> The amount of memory it is trying to allocate is not great, about 20 bytes
> or so.
> I am using PPC405.
> The debugger shows that I am down in _Heap_Block_allocate, and the crash is:
> Vector: 0x0200 (Machine Check).

If you have not run out of heap which doesn't sound likely, it is 
normally a problem of an application using memory outside the bounds of 
the malloc previously that can cause heap pointer corruption.

Check that your previous mallocs to not write outside the memory that 
they were allocated.  Sometimes these are difficult to track down.

Hope this helps.

Ian Caddy
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9444 2634

More information about the users mailing list