Dynamic memory allocation approaches for C++ apps - pros and cons

Chris Johns chrisj at rtems.org
Sun Dec 9 02:29:06 UTC 2007


Joel Sherrill wrote:
> 
> (2) Much code is terribly optimistic about malloc() and
> doesn't ever worry about it failing.  This can result in
> strange situations when you do run out of memory.
> 

I agree. I think the c/src/libchip/ide/ata.c code needs to be reviewed and 
changed. It uses malloc and free for block IO requests. The semaphore 
create/delete per request could also be looked at.

Regards
Chris




More information about the users mailing list