summaryrefslogtreecommitdiffstats
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 05:48:28 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-23 05:48:28 +0000
commit92940d4e46661a7632770b2835426c4ed9e98845 (patch)
treeb13f3fbe9e2ed2f7b3538a470648b39de5a19659 /gcc/ada/bindgen.adb
parentdea95b6dc4ca9ea13a2df0b37b82ec49ed92d0e6 (diff)
downloadppe42-gcc-92940d4e46661a7632770b2835426c4ed9e98845.tar.gz
ppe42-gcc-92940d4e46661a7632770b2835426c4ed9e98845.zip
2010-06-23 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Minor reformatting. 2010-06-23 Doug Rupp <rupp@adacore.com> * bindusg.adb (Display): Write -Hnn line. * bindgen.adb (Gen_Adainit_Ada): Write Heap_Size to binder file as necessary. * init.c (__gl_heap_size): Rename from __gl_no_malloc_64 and change valid values to 32 and 64. (GNAT$NO_MALLOC_64): Recognize TRUE, 1, FALSE, and 0 in addition to ENABLE, DISABLE as valid settings. * switch-b.adb (Scan_Binder_Switches): Process -Hnn switch. * opt.ads (Heap_Size): New global variable. * gcc-interface/utils2.c (maybe_wrap_malloc): Remove mostly redundant TARGET_MALLOC64 check. Fix comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161243 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index 883c60690a8..316459fbb57 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -111,6 +111,7 @@ package body Bindgen is
-- Main_Priority : Integer;
-- Time_Slice_Value : Integer;
+ -- Heap_Size : Natural;
-- WC_Encoding : Character;
-- Locking_Policy : Character;
-- Queuing_Policy : Character;
@@ -136,6 +137,10 @@ package body Bindgen is
-- A value of zero indicates that time slicing should be suppressed. If no
-- pragma is present, and no -T switch was used, the value is -1.
+ -- Heap_Size is the heap to use for memory allocations set by use of a
+ -- -Hnn parameter for the binder or by the GNAT$NO_MALLOC_64 logical.
+ -- Valid values are 32 and 64. This switch is only available on VMS.
+
-- WC_Encoding shows the wide character encoding method used for the main
-- program. This is one of the encoding letters defined in
-- System.WCh_Con.WC_Encoding_Letters.
@@ -615,6 +620,15 @@ package body Bindgen is
WBI (" Features_Set : Integer;");
WBI (" pragma Import (C, Features_Set, " &
"""__gnat_features_set"");");
+
+ if Opt.Heap_Size /= 0 then
+ WBI ("");
+ WBI (" Heap_Size : Integer;");
+ WBI (" pragma Import (C, Heap_Size, " &
+ """__gl_heap_size"");");
+
+ Write_Statement_Buffer;
+ end if;
end if;
-- Initialize stack limit variable of the environment task if the
@@ -786,7 +800,18 @@ package body Bindgen is
WBI (" if Features_Set = 0 then");
WBI (" Set_Features;");
WBI (" end if;");
+
+ -- Features_Set may twiddle the heap size according to a logical
+ -- name, but the binder switch must override.
+
+ if Opt.Heap_Size /= 0 then
+ Set_String (" Heap_Size := ");
+ Set_Int (Opt.Heap_Size);
+ Set_Char (';');
+ Write_Statement_Buffer;
+ end if;
end if;
+
end if;
-- Generate call to set Initialize_Scalar values if active
OpenPOWER on IntegriCloud