-----Oorspronkelijk bericht----- Van: [email protected] namens Øyvind Harboe Verzonden: wo 12/16/09 21:43 Aan: Thomas Kindler CC: [email protected] Onderwerp: Re: [Openocd-development] Codecheck On Wed, Dec 16, 2009 at 9:36 PM, Thomas Kindler <[email protected]> wrote: > Carsten Breuer wrote: >>>> The first thing i had to learn was, that it is verry uncommon in >>>> OpenOCD to check the result of malloc. > >>> >>> This is a known problem where we gladly accept patches to fix each >>> case. >> >> OK, then i will start to fix all the mallocs >> that are handled not correct yet and where >> i understand what to do if they fail. > > On a normal, modern operating system, (reasonably sized) mallocs should > never fail, as the system will start thrashing and killing off processes > long before malloc() fails. > > (This will be a different story for the Zy1000, of course..)
>The zy1000 has "infinite" ram w.r.t. small allocations(32 or >64mBytes depending on revision), so not checking small >allocations is *highly unlikely * to cause problems for any >embedded host with oodles of ram(megabytes). On Linux you'll get strange effects when a systems runs out of memory due to memory leaks. Google for oom killer and learn Linux keeps working (!) in mysterious ways. It took us a while to figure out what was going on exactly. Nico Coesel
_______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
