help-hurd
[Top][All Lists]
Advanced

[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

Hi!

Guy Bormann <spaderman@SPAM.wanadoo.NO.be> 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?

Cheers,
GNU/Wolfgang

-- 
Wolfgang Jährling  <wolfgang@pro-linux.de>  \\  http://stdio.cjb.net/
Debian GNU/Hurd user && Debian GNU/Linux user \\  http://www.gnu.org/
The Hurd Hacking Guide: http://www.gnu.org/software/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]