From: zychp@o2.pl
Subject: very long string and Segmentation fault
Date: 7 Jul 2006 01:39:29 -0700
Date: 2006-07-07T01:39:29-07:00 [thread overview]
Message-ID: <1152261569.199484.272250@m73g2000cwd.googlegroups.com> (raw)
Hello,
I have problem with creating very long strings. When I try to create
string bigger than 5MB I get Segmentation fault.
Tmp: String_Access;
...
Tmp := new String (1 .. 10_000_000);
In this line a get Segmentation fault. I use GNAT 3.4.5.
What is more when I run this code:
type ttt is array (positive range <> ) of Character;
type ttt_a is access ttt;
Tmp : ttt_a ;
begin
Tmp := new ttt ( 1 .. 10_000_000 ) ;
for i in Tmp'range loop
Tmp(i) := 'x';
end loop;
It works fine. But now it's hard to use some Ada.Strings.Fixed
functions.
What can be the reason of this? How it can be soved?
Regards
Gorion
P.S. I have to use pure Strings (no Unbounded_String etc. ).
next reply other threads:[~2006-07-07 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-07 8:39 zychp [this message]
2006-07-07 18:24 ` very long string and Segmentation fault 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
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