[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is malloc garbage collecting?

From: Wolfgang Jährling
Subject: Re: Is malloc garbage collecting?
Date: Sun, 14 Apr 2002 15:33:41 +0200
User-agent: Mutt/1.0.1i


Guy Bormann <> wrote:
>   However, what happens to the originally allocated pointer in the
> user program? Is that properly handled by mmap or is this a leak?
> (It is OK in small example programs but not for long-running
> programs that repeatedly allocate buffers.) Or is there a mistake
> in dump.c and should the user program free(buf) when it has
> changed?

Looking at what glibc/hurd/fd-read.c does, it seems to be a leak to not
check for equality and freeing the buffer. Does anyone agree/disagree?


Wolfgang Jährling  <>  \\
Debian GNU/Hurd user && Debian GNU/Linux user \\
The Hurd Hacking Guide:
["We're way ahead of you here. The Hurd has always been on the    ]
[ cutting edge of not being good for anything." -- Roland McGrath ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]