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

Re: memory debugging and C++ (program keeps crashing)



Jochen Voss <jvoss2@web.de> writes:

> If I remember correctly, you can do
>
>     ptr = malloc (<really large number>);
>
> without problem.  The real memory allocation is delayed until the
> memory is actually used.  So a program allocating but not using
> 2 gigs of memory would just run fine.

It depends on the kernel.  You can switch off memory overcommitment in
at least some -ac versions of Linux.

-- 
Florian Weimer 	                  Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT                          fax +49-711-685-5898



Reply to: