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

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



Hi,

On Thu, Oct 03, 2002 at 07:59:23PM +0200, Jochen Voss wrote:

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

Although it's still bad practice of course as it precludes all 
allocation policies other than total overcommit.

Cheers,


Emile.

-- 
E-Advies / Emile van Bergen   |   emile@e-advies.info
tel. +31 (0)70 3906153        |   http://www.e-advies.info

Attachment: pgpGv1PB2n0t6.pgp
Description: PGP signature


Reply to: