comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: very long string and Segmentation fault
Date: Sat, 08 Jul 2006 07:01:59 +0200
Date: 2006-07-08T07:01:59+02:00	[thread overview]
Message-ID: <5804618.FkKYG9Xm5Y@linux1.krischik.com> (raw)
In-Reply-To: pan.2006.07.07.19.15.40.699002@linuxchip.demon.co.uk.uk.uk

Dr. Adrian Wrigley wrote:

> On Fri, 07 Jul 2006 20:24:52 +0200, Martin Krischik wrote:
> 
>> zychp@o2.pl wrote:
>> 
>>> I have problem with creating very long strings. When I try to create
>>> string bigger than 5MB I get  Segmentation fault.
>> 
>> Well, you should not ;-)  - its certainly a compiler bug.
> 
> Actually, I think it is more of a feature(?)
> 
> I first hit this with GNAT 3.15p (Linux).  I think the explanation
> was that the "new" was allocated on the stack when the data weren't
> being kept after the function returns.  It's called "optimization",
> apparently.  I had to resort to various tricks to get it to use
> heap allocation instead. (making the size non-static might help.
> Calling malloc instead works.)  Very messy.

Library Level access type ???

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



  parent reply	other threads:[~2006-07-08  5:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07  8:39 very long string and Segmentation fault zychp
2006-07-07 18:24 ` Martin Krischik
2006-07-07 19:17   ` Dr. Adrian Wrigley
2006-07-07 19:38     ` Dmitry A. Kazakov
2006-07-08  5:01     ` Martin Krischik [this message]
2006-07-11  9:29 ` zychp
replies disabled

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