comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: exception access violation
Date: Wed, 15 Nov 2006 10:58:09 +0100
Date: 2006-11-15T10:58:09+01:00	[thread overview]
Message-ID: <4s06i8FsekphU1@mid.individual.net> (raw)
In-Reply-To: 1163532883.352177.211940@m73g2000cwd.googlegroups.com

Jade wrote:

> I shuffled around my code and the error is now
> 
> Exception Name        => STORAGE_ERROR
>  Exception Message     => stack overflow (or erroneous memory access)

Stack size is an OS matter, so you must tell gnatlink the parameters that
will go to the system linker. There are a few threads discussing how to do
this with GNAT that you'll easily find in google groups, at least one is
recent.

However, if you're managing large data structures (over 4MB in size), I'd go
for a heap-based solution using controlled types. In my experience, abusing
the stack is a source of headaches sooner or later (specially if you are
doing something portable).

Note that ill-managed recursivity can also be a source of stack overflows,
and you can check this in GNAT with -fstack-check. Without it, stack
overflows are sometimes reported as violations instead.

Regards, Alex.



  reply	other threads:[~2006-11-15  9:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 19:31 exception access violation Jade
2006-11-13 21:35 ` Georg Bauhaus
2006-11-14  9:09 ` Alex R. Mosteo
2006-11-14 19:34   ` Jade
2006-11-15  9:58     ` Alex R. Mosteo [this message]
2006-11-15  9:52       ` Georg Bauhaus
2006-11-15 13:32         ` Alex R. Mosteo
2006-11-15 23:43         ` Kevin K
  -- strict thread matches above, loose matches on Subject: below --
2009-05-18 16:05 Exception_Access_Violation mhamel_98
2009-05-18 16:14 ` Exception_Access_Violation John B. Matthews
2009-05-19  7:23   ` Exception_Access_Violation Alex R. Mosteo
2009-05-20 15:30     ` Exception_Access_Violation mhamel_98
2009-05-22 14:34       ` Exception_Access_Violation Björn Persson
2009-05-22 15:17         ` Exception_Access_Violation Niklas Holsti
2009-05-22 16:38       ` Exception_Access_Violation Adam Beneschan
2001-12-07 12:41 exception access violation Cousins, Jeff
replies disabled

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