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

Sv: Sv: Sv: Sv: Sv: Memory allocators



> 1024x1024 - also notice the while loop - why don't you try to compile
> the thing and run it to see what happens.
>
Of course. I should have done that from the start so I could have made a
response that was a little more intelligent.

> >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.
>
> I compiled with VC 6.0 and ran the program under NT 4.0. It returned null
> after
> memory was exhausted.
>
Same thing for me (0 was returned).

It seems I had misread the documentation. The behavior of throwing an
exception of type xalloc is something that has to be turned on to happen.

> I tried a similar program under linux a while ago
> and got a similar result.  I'm not sure if you can set the page file to
> unlimited. I guess you can set it to more than the free space on the hard
> disk but
> I don't think the system will let you.
>
No, it won't. What I meant by "unlimited" was "only limited by the available
disk-space".

It took 5 minutes of "disk-shredding" (read: harddisk activity) before the
program finished.