Reserved address space for resources (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Directives (List) Index


OS Linux
Type Parameter
Syntax {$M reservedbytes} {$RESOURCERESERVE reservedbytes}
Default {$M 1048576}
Scope Global


This directive is used in Linux programming only. For information about the $M ($MINSTACKSIZE and $MAXSTACKSIZE) directives in Windows, see Memory allocation sizes (Delphi).

Use the $M directive to increase or decrease the amount of extra address space reserved for resources.

By default, the compiler reserves 1MB of address space, in addition to what the application actually uses at link time, for resources. This extra address space is provided to accommodate localized versions of the application that incorporate larger resource files than the original version. As long as there is sufficient reserved address space, you won't have to relink the entire executable to produce a localized version.

For maximum portability between Windows and Linux platforms, you should use the long form of this directive $RESOURCERESERVE and not $M.

See Also