[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Store arrays i ADA



Hej sslug-prog,

Jeg har et problem med allokering af en stor array i ADA. 

Hvis en array bliver af en given størrelse får jeg en "segmentation fault", 
når jeg forsøger at køre programmet. Se nedenstående eksempel.

Hvis jeg laver array'en endnu større får jeg en "raise STORAGE_ERROR : 
test_array.ada:7", når jeg forsøger at køre programmet.

Jeg formoder det har noget at gøre med, hvor meget hukommelse jeg har til 
rådigheden, men der er masser af fysisk hukommelse, så det burde ikke være 
problemet.

Jeg kompilerer programmet med "gnatmake test_array.ada"

Er der nogen der har en forklaring?

På forhånd tak

Anders Lyckegaard



	-- Test array sizes
procedure test_array is

	lwa : integer := 1_048_301; 
	-- lwa > 1_048_300  then segfault 
	-- lwa => 2_100_000 then storage error 

	type work_array is array(1..lwa) of long_float;
	wa : work_array := (others => 0.0);

begin

	null;

end test_array;




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:58 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *