delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/06/05/15:44:43

From: ckgp!thomas AT uunet DOT uu DOT net
Subject: Virtual memory and malloc()
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Fri, 5 Jun 92 14:25:20 EDT

hi,

>Since gcc is a Unix compiler, it is thought to give you as much memory as
>you need. It should *never* let you run out of memory. Especially malloc
>cannot see when your disk is full...

 I agree with this, virtual memory isn't there in the first place so you 
are in a way talking about detecting a limit of something which is virtual.

>> Instead, I got this error:
>> >Fatal! disk full writing to swap file
>>
>Oh yes. This is the real limit of virtual memory: the swap file (-partition,
>whatever) will be full some day. If you really need to process such a lot of
>memory, get a bigger hard disk. ;-)

 I agree again, you need a bigger disk drive or you need to do some house
cleaning on the drive you have... I guess the point is: don't expect to be
able to run a porgram that requires tons of memory on a machine that doesn't
have tons of memory (real and virtual)...

 What is the benefit of getting the NULL returned over having the Fatal
Error? (perhaps, being able to save some information before dumping out of
the program?) either way the program isn't going to work, because you are 
out of memory? Both cases you are going to have to tell the user that they
need more disk space? I guess I'm asking what are you going to do once
you have the NULL?

just my $0.02 ...

================================================================================
Thank you,            ||  "Sol est invisiblis in hominibus, in terra vero
Michael Thomas        ||   visibilis, tamen ex uno et eodem sole sunt ambo"
(..uunet!ckgp!thomas) ||                    -- Theatrum Chemicum (Ursel, 1602)
================================================================================


- Raw text -


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