From: Junio C Hamano Date: Mon, 24 Oct 2011 07:07:20 GMT Subject: Re: [PATCH] read-cache.c: fix index memory allocation Message-ID: <7vipne50lz.fsf@alter.siamese.dyndns.org> In-Reply-To: <4EA4B8E7.5070106@lsrfire.ath.cx> Thanks. This approach may be the most appropriate for the maintenance track, but for the purpose of going forward, I wonder if we really want to keep the "estimate and allocate a large pool, and carve out individual pieces". This bulk-allocate dates back to the days when we didn't have ondisk vs incore representation differences, IIRC, and as the result we deliberately leak cache entries whenever an entry in the index is replaced with a new one. Does the overhead to allocate individually really kill us that much for say a tree with 30k files in it?