-bmaxdata, -bmaxstack

Category

Linking

@PROCESS

None.

Purpose

Specifies the maximum amount of space to reserve for the program data segment and stack segment for programs where the size of these regions is a constraint.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -bmaxdata--:--bytes----------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>- -bmaxstack--:--bytes---------------------------------------><

Defaults

Not applicable.

Parameters

Specify the size as a decimal, octal (which is prefixed by 0), or hexadecimal value (which is prefixed by 0x).

Usage

The data segment holds, among other things, heap storage that is used by the program.

For 32-bit programs, the maximum value allowed by the system is as follows:
  • 0x80000000 for programs that are running under Large Program Support
  • 0xD0000000 for programs that are running under Very Large Program Support
For more information about creating large AIX® programs, see "Large Program Support Overview" in AIX General Programming Concepts: Writing and Debugging Programs.

For 64-bit programs, you can provide a maximum size for the programs data heap using the -bmaxdata option. You can specify any value but the data area cannot extend past 0x06FFFFFFFFFFFFF8 regardless of the value you specified.

If the program has large amounts of automatic data or otherwise exceeds the soft limit on stack size for a program, specify -bmaxstack when you link the program. Use this option to define the soft limit up to 256 MB for 32-bit mode or up to the limit imposed by system resources for 64-bit mode. However, each main program or subprogram is limited to 256 MB per instance.

Rules

These options are passed directly to the ld command and are not processed by XL Fortran at all.

Examples

xlf95 -O3 -qhot -bmaxdata:0x20000000 huge_data_model.f
xlf95 -O3 -qhot -bmaxstack:2000000 lots_of_automatic_data.f