[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sv: Sv: Sv: Sv: Memory allocators
Bjarke Hammersholt Roune wrote:
>> while (1)
>> x = new char ;
>> if (x == 0)
>> cout << "NULL returned on memory failure" << endl;
>Ehh? 1.048.576 bytes is something like 1 megabyte. I do think most any
>system will be able to allocate 1 megabyte of memory.
You forget the while (1). So it's in fact an infinite amount of memory ;)
>Windows can't run out of memory, though, atleast not if theres enough
>harddisk space and the size of the swap-file has not been limited. It'll
>happily shred your harddisk before reporting not enough memory.
Hmm, right. Win has very bad memory management. But for Unices it will work
Drive A: not responding...Formatting C: instead