Re: [REGRESSION, BISECTED] `git checkout <branch>` started to be memory hog

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

 



On Fri, Jul 22, 2011 at 02:31:22PM -0700, Junio C Hamano wrote:
> Jeff King <peff@xxxxxxxx> writes:
> 
> > How about:
> >
> > -- >8 --
> > Subject: [PATCH] streaming: free git_istream upon closing
> >
> > Kirill Smelkov noticed that post-1.7.6 "git checkout"
> > started leaking tons of memory. The streaming_write_entry
> > function properly calls close_istream(), but that function
> > did not actually free() the allocated git_istream struct.
> >
> > The git_istream struct is totally opaque to calling code,
> > and must be heap-allocated by open_istream. Therefore it's
> > not appropriate for callers to have to free it.
> >
> > This patch makes close_istream() into "close and de-allocate
> > all associated resources". We could add a new "free_istream"
> > call, but there's not much point in letting callers inspect
> > the istream after close. And this patch's semantics make us
> > match fopen/fclose, which is well-known and understood.
> >
> > Signed-off-by: Jeff King <peff@xxxxxxxx>
> 
> Much nicer ;-)  Thanks.

Jeff, Junio,

Thanks for fixing this.


Kirill
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]