guile-user
[Top][All Lists]
Advanced

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

Re: freeing fports


From: Kevin Ryde
Subject: Re: freeing fports
Date: Wed, 24 Sep 2003 09:49:22 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Aaron VanDevender <address@hidden> writes:
>
> I noticed that the fport free function doesn't return how much
> it frees.

Thanks.

> This patch should take care of that.

No, not quite, I think you need to allow for buffers possibly being
"shortbuf" (size 1), which is not freed.

Probably best to make the adjustment in fport_close, since a port can
be closed before it's freed.  setvbuf looks like it suffers the same
sort of leak.

        * fports.c (scm_setvbuf, fport_close): Call scm_done_free for space
        freed.

Unfortunately this still doesn't make open+close leave scm_mallocated
unchanged, so maybe there's a leak somewhere else too.  Maybe it's not
worth worrying about in the 1.6 branch.  Seems ok in the latest cvs.

Attachment: fports.c.done_free.diff
Description: Text document


reply via email to

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