newlibc memory leaks (was rtems 4.6.0pre5: memory leak after deleting a task used printf)
norume at aps.anl.gov
Thu Oct 21 14:57:09 UTC 2004
Till Straumann wrote:
> Looking into this issue, as always, worms are spilling
> out of the can...
> I was trying to see if we could use as much 'newlib' code
> as possible to cleanup the reent structure after deleting
> a task. As this should be portable to newer releases of newlib,
> I also checked on the current status of newlib.
> It seems that newlib changed recently to maintain 'FILE' objects
> and 'atexit' handlers on a 'process' rather than 'task' basis
> (which makes sense, sort of).
Does this mean that stdin/stdout/stderr are no longer per-thread values? If
so, how are the FILE data structures protected from race conditions when
multiple threads are active in, say, printf?
Eric Norum norume at aps.anl.gov
Advanced Photon Source Phone: (630) 252-4793
Argonne National Laboratory
More information about the users