[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dynamic memory allocation approaches for C++ apps - pros and cons
- Date: Sun, 09 Dec 2007 13:29:06 +1100
- From: chrisj at rtems.org (Chris Johns)
- Subject: Dynamic memory allocation approaches for C++ apps - pros and cons
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