home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,299 of 2,978   
   Jonas Maebe to Jim Bishop   
   Re: Memavail & Getmem - Turbo vs FreePas   
   16 Nov 06 11:52:11   
   
   XPost: comp.lang.pascal.misc   
   From: Jonas.Maebe@rug.SPAM.ac.ME.be.NOT   
      
   In article ,   
    Jim Bishop  wrote:   
      
   > I seem to recall in an old post that memavail doesn't mean much in a   
   > Windows environment.   
      
   That's correct.   
      
   > Is it safe to assume that if enough virtual memory   
   > is available from the system that a "getmem" in FreePascal ought always   
   > to be successful?   
      
   In most cases that works fine. If you want to be safe, you have to either   
   a) set the global system unit variable ReturnNilIfGrowHeapFails to true,   
   and getmem will return nil when no more memory is available   
   b) use exceptions to catch the run time errors (which are converted to   
   exceptions if you use the sysutils unit) which occur when an   
   out-of-memory condition occurs.   
      
      
   Jonas   
      
   (follow-up set to comp.lang.pascal.misc)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca