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

Sv: Memory allocators

>>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.

>Anyway, 5min is too much.
If you limit the size of your swapfile, then it won't take 5 minutes. Most
people don't limit their swapfiles, though.

> We need a better test under Win. Perhaps testing
>it ourselves and manually including the proper symbols?
I think we should make it so that the default is to check for everything
(both 0 return-value and an exception), and throw bad_alloc in our own
operator new. Then people who use PenguinPlay and who want it to run as
effeciently as possible can declare some preprocessor symbols that will tell
PenguinFile what behavior operator has on in the compiler its being compiled
on, and that will then allow PenguinFile to adjust its custom new operator
(if that's nessecary) in the most effecient way possible.

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.