From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <009d01c3454a$2b1ca5a0$d2944251@insultant.net> From: "boyd, rounin" To: <9fans@cse.psu.edu> References: <200307081136.h68Ba5719800@augusta.math.psu.edu> Subject: Re: [9fans] Rstat needs three size fields? MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit Date: Tue, 8 Jul 2003 14:12:14 +0200 Topicbox-Message-UUID: ee763b04-eacb-11e9-9e20-41e7f4b1d025 > Another common strategy that I've used is to double up until to > threshold, and then extend by a constant chunk size after that. For > instance, you might double things until you get to, say, a megabyte, > and then add on a megabyte after that. yeah, that's not a bad idea, but it depends on what you're trying to allocate etc ... defining the 'threshold' and the 'chunk size' is the hard part. make a guess and then gets some stats on how it actually behaves and then tweak the numbers. make sure you have some good profiling tools too, 'cos the problem might not be the memory allocator, even though it's _the dumbest allocator ever written_.