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

Re: Sv: Memory allocators



Bjarke Hammersholt Roune wrote:

>>>It took 5 minutes of "disk-shredding" (read: harddisk activity) before
>>>the program finished.
>>
>>I *knew* Windows memory management is horrible ;)
>>
>I wouldn't call it horrible, its just that I've got alot of free harddisk
>space and Windows is taking advantage of it. Windows can't know that I
>*want* it to run out of memory.

The point is that Linux didn't even *touch* the swapspace for this test. It
always knows how much free memory it has and allocates that appropriately.
But as long as I don't *access* the memory there's no need for paging.

Now you could argue that this won't work with a variable sized swapfile,
but resizing a file is also a millisecond operation.

>Even if we know the system and compiler being used, we can't be sure that
>operator new behaves as it normally does on that system with that compiler,
>as the user can set up a custom operator new... And different versions may
>behave differently.

*sigh*. Now I don't have an answer to that now :(


	Christian
--

Drive A: not responding...Formatting C: instead