Previous: Setting Stack Size from gnatlink, Up: Linking Using gnatlink
gnatlink
It is possible to specify the program heap size from gnatlink
.
Assuming that the underlying linker is GNU ld there is two ways to do so:
-Xlinker
linker option
$ gnatlink hello -Xlinker --heap=0x10000,0x1000
This set the heap reserve size to 0x10000 bytes and the heap commit size to 0x1000 bytes.
-Wl
linker option
$ gnatlink hello -Wl,--heap=0x1000000
This set the heap reserve size to 0x1000000 bytes. Note that with
-Wl
option it is not possible to set the heap commit size
because the coma is a separator for this option.