www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/10/12/13:41:02

Date: Mon, 12 Oct 92 13:17:15 EDT
From: DJ Delorie <dj AT athena DOT ctron DOT com>
To: stefans AT bauv106 DOT bauv DOT unibw-muenchen DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: problems with memory allocation

>The following simple program happily allocates memory until my machine dies.
>Although i should have no more than approx. 150 MByte (disc + ram), it
>allocates more than 300 MB before hanging.

The way go32 and libc work, you could malloc(512*1024*1024) if you
wanted.  It doesn't count as used memory unless you *use* it.  Try
using calloc instead of malloc next time.

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019