comp.lang.ada
 help / color / mirror / Atom feed
From: geert@gonzo.sun3.iaf.nl (Charlie Root)
Subject: Re: Segmentation Fault
Date: 1997/04/15
Date: 1997-04-15T00:00:00+00:00	[thread overview]
Message-ID: <5j0uo6$7b4$1@gonzo.sun3.iaf.nl> (raw)
In-Reply-To: 33538A67.709A@reading.ac.uk


William Paul Berriss (W.P.Berriss@reading.ac.uk) wrote:
   When I change the 64X64X64 to a 128X128X128 they both crash at
   run-time giving Segmentation Fault.

   Thus I cannot ask for a 6 megabyte chunk of memory on
   a Sun.  
   	Is this correct?  Why?

It may be that you do not allocate the memory dynamically
using "new", but implicitly declaring a local variable 
for example. In that case it typically is allocated on the
stack, which should be large enough. 

Use the Storage_Size pragma for the task that allocates
these large chunks of memory, setting the size to 30 MB
for example. On most modern systems having a large stack
doesn't hurt as long as you do not touch it. So the memory
is only actually needed when you *use* the whole stack.

I do think however that Ada compilers should provide
larger stacks by default on platforms as described above.
Bob Duff recently described a good approach for this,
without requiring too much virtual address space.

Regards,
   Geert




  parent reply	other threads:[~1997-04-15  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <335358C5.43F8@reading.ac.uk>
1997-04-15  0:00 ` Segmentation Fault Robert Dewar
1997-04-18  0:00   ` Keith Thompson
1997-04-20  0:00     ` Robert Dewar
1997-04-16  0:00 ` William Paul Berriss
1997-04-16  0:00   ` Stack and Heap sizes William Paul Berriss
1997-04-16  0:00     ` Samuel Tardieu
1997-04-16  0:00       ` Samuel Tardieu
1997-04-18  0:00     ` Robert Dewar
1997-04-20  0:00       ` Ada program's use of Stack and Heap William Paul Berriss
     [not found] ` <33538A67.709A@reading.ac.uk>
1997-04-15  0:00   ` Charlie Root [this message]
1997-04-16  0:00   ` Segmentation Fault Nicolas HUYNH
     [not found]     ` <3355DB39.3BAF@reading.ac.uk>
1997-04-19  0:00       ` I've Sussed my " Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox