From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: segfault with large-ish array with GNAT
Date: Thu, 18 Mar 2010 19:57:13 -0400
Date: 2010-03-18T19:57:13-04:00 [thread overview]
Message-ID: <wccmxy55gkm.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: ffabe02c-9124-4bd6-be8a-8dab42fcb3cf@y17g2000yqd.googlegroups.com
Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
> Jerry wrote on comp.lang.ada:
>> I would have thought that Ada (or GNAT
>> specifically) would be smart enough to allocate memory for large
>> objects such as my long array in a transparent way so that I don't
>> have to worry about it, thus (in the Ada spirit) making it harder to
>> screw up. (Like not having to worry about whether arguments to
>> subprograms are passed by value or by reference--it just happens.)
>
> So, you would like the Ada run-time to bypass the operating system-
> enforced, administrator-approved stack limit? If userspace programs
> could do that, what would be the point of having a stack limit in the
> first place?
Well, yeah, but what IS the point of having a stack limit in the
first place? As opposed to a limit on virtual memory use,
whether it be stack or heap or whatever.
It's useful to limit a process to a certain amount of virtual address
space. It prevents that process from hogging the whole system. And
it prevents infinite-recursion bugs from causing thrashing. And it
prevents infinite-"new" bugs from causing the same.
It seems to me, a process should be allowed to allocate its
memory however it likes. If it is allowed to allocate (say)
2 gigabytes of address space, then it should be allowed to
allocate (say) half of that to the main thread's stack,
if it likes.
- Bob
next prev parent reply other threads:[~2010-03-18 23:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 19:21 segfault with large-ish array with GNAT Jerry
2010-03-17 19:36 ` Gautier write-only
2010-03-17 19:58 ` Georg Bauhaus
2010-03-18 6:45 ` Jerry
2010-03-18 7:52 ` Ludovic Brenta
2010-03-18 23:57 ` Robert A Duff [this message]
2010-03-18 10:13 ` Jeffrey Creem
2010-03-18 10:23 ` Ludovic Brenta
2010-03-19 0:44 ` Jerry
2010-03-18 19:51 ` Adam Beneschan
2010-03-18 14:44 ` John B. Matthews
2010-03-19 4:44 ` Jeffrey R. Carter
2010-03-19 8:14 ` John B. Matthews
2010-03-18 15:36 ` Gautier write-only
2010-03-18 16:46 ` tmoran
2010-03-18 19:11 ` Warren
2010-03-18 17:03 ` Warren
2010-03-18 20:38 ` Maciej Sobczak
2010-03-19 13:26 ` Charmed Snark
2010-03-19 17:27 ` tmoran
2010-03-19 18:02 ` Simon Wright
2010-03-19 20:10 ` Warren
2010-03-19 21:50 ` Adam Beneschan
2010-03-19 20:24 ` Warren
2010-03-19 20:38 ` Warren
2010-03-19 8:31 ` Ludovic Brenta
2010-03-19 13:20 ` Warren
2010-03-19 12:04 ` Brian Drummond
2010-03-19 19:22 ` Jerry
2010-03-19 20:22 ` Jeffrey R. Carter
2010-03-19 23:24 ` Jerry
2010-03-20 0:25 ` Jeffrey R. Carter
2010-05-07 21:58 ` Raising the stack limit (was: segfault with large-ish array with GNAT) Björn Persson
2010-03-17 19:57 ` segfault with large-ish array with GNAT jonathan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox