On Tue, Jan 17, 2012 at 11:05:37AM +0100, Samuel Thibault wrote: > In addition to that, it might be better for performance to rather > remember how much memory was previously allocated, and only reallocate > if more memory is needed, and twice as much, so as to reduce the amount > of free/malloc calls.
I'd suggest using a base size of e.g. 64 or another power of two close to the expected common size, instead of "twice as much". -- Richard Braun -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

