>>>>> Peter Shenkin writes:
Peter> Hi,
Peter> So when malloc() returns NULL on your system, or ALLOCATE returns a
Peter> "failed" status, is there no way to print a message telling the
Peter> user that this happened?
That is in no way implied by what I said. Yes, there is a way -- the
programmer can check the return code of malloc or the STAT variable in
ALLOCATE. Should compiler writers (and I am not one) be obliged to bloat
memory management handling to aid those who don't appear to be qualified to
use supercomputers? My personal opinion, of course ;-).
Actually, we do generate exceptions in response to malloc problems. The
problem is simply that if you hit a situation in which you have maxxed out
*all* available memory, there may not be any way to print out the error, at
least until more memory becomes available. This would probably only occur in
the most extreme situations.
Peter> On 30 Mar 2000, Ted Stern wrote:
>> I should point out that on Tera MTA systems, stack availability is the
>> same as heap; that is, the entire memory available on the machine (real
>> and virtual). So printing an error when stack (or heap) allocation
>> overflows would be problematic -- there would be no space to do
>> anything, let alone print ;-).
--
Ted Stern Porting/Tuning/Analysis, Applications & Libraries
Tera Computer Company http://www.tera.com
411 First Avenue South, Suite 600 Direct 206/701-2182, Main 701-2000
Seattle, WA 98104-2860 Fax1 206/701-2205, Fax2 701-2500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|