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

Re: more question about porting/gcc



On Fri, 20 Mar 1998, Jo Even Skarstein wrote:

> I can understand that a process is given the largest available block
> at startup, but is it possible to modify Malloc() so it uses the
> *smallest* possible block? Theoretically this is just as bad (if not
> worse) as using the largest block, but if possible it should be tested
> and see if things improves. 

But that would be even worse, since it's impossible to prevent some
fragmentation, and so programs would always get the smallest possible
amount of memory. If there was a 10MB block and a 100KB block, the
programs would get only 100K! Really the amount of memory required by a
program would need to be known before the program is loaded, then the most
suitably sized block could be used.

-- 
Mario Becroft                        Auckland, New Zealand
mb@tos.pl.net                    http://www.pl.net/~mario/      |\__/,|   (`\
Tariland, Atari Support in New Zealand                        _.|o o  |_   ) )
tariland@tos.pl.net     http://www.pl.net/~mario/tariland/ --(((---(((--------