Of course the user can demand, but whether allocation is on
stack or heap, the system should provide a way to tell the
user "you can't get what you asked for".
Fortran mandates that the system do this for heap allocation
(or, I should say, for the ALLOCATE command, since Fortran
doesn't have the concept of heap and stack, and indeed not
every hardware/OS has that concept).
There needs to be a way to do this when the syntax of
requesting dynamic storage is automatic arrays, rather
than ALLOCATE calls.
It doesn't matter, in this regard, whether the OS has
a stack or a heap, and whether it uses different mechanisms
for the two different kinds of dynamic allocation.
-P.
On Thu, 30 Mar 2000, Phillip Helbig 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 ;-).
>
> You mean a user can't demand more than 100% of the resources?! :-)
>
--
** Whether the playing field is level depends on the coordinate system. ***
********* Peter S. Shenkin; Schrodinger, Inc.; (201)433-2014 x111 *********
*********** [log in to unmask]; http://www.schrodinger.com ***********
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|