[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory leak?
- From: "alex.mania@..." <alex.mania@...>
- Date: Wed, 30 Jan 2008 21:56:32 +0900
-- Sorry for the quick double post
I should have checked beforehand, but after poking around ltable.c it looks like
it's a design decision that tables are (almost) never shrunk.
The only reason it shrunk the array when the hash table was used in the example
was because the hash table had previously been unused - requiring it to grow and
reevaluate its array size. So it looks like you can't count on a table being
shrunk... I would be very interested to see a program in which this would be a
problem though. Most high speed allocators rarely shrink blocks anyway; even if
I have a feeling any possible patch would slow table setting considerably =/