Installation guide
• −T and −D options
As previously noted, if the −T and −D options are used with the −taso
option, the values that you specify for them will override the −taso
option’s default values. Therefore, to avoid defeating the purpose of the
−taso option, you must select addresses for the −T and −D options that
are within the address range observed by the −taso option.
• malloc() function
To avoid problems with addressing when you use malloc in a taso
application that does not use threads, you must ensure that the
combination of the default data-size resource limit and the starting
address of the data segment do not exceed the maximum 31-bit address
(0x7fff ffff). Applications that use threads are unlikely to encounter this
problem because memory allocations for thread applications start in a
much lower address space than that used for nonthread applications.
The data-size resource limit is the maximum amount of data space that
can be used by a process. This limit can be adjusted using the limit (C
shell) or ulimit (Korn shell) commands. As previously noted, you can
adjust the starting address of the data segment by using the −D option
on the cc command.
• mmap system call
Applications that use the mmap system call must use a jacket routine to
mmap to ensure that mapping addresses do not exceed a 31-bit range.
This entails taking the following steps:
1. To prevent mmap from allocating space outside 31-bit address space,
specify the following compilation option on the cc command line
for all modules (or at least all modules that refer to mmap):
-Dmmap=_mmap_32_
This option equates the name of the mmap function with the name
of a jacket routine (_mmap_32_). As a result, the jacket routine is
invoked whenever references are made to the mmap function in the
source program.
2. If the mmap function is invoked in only one of the source modules,
either include the jacket routine in that module or create an
mmap_32c.o object module and specify it on the cc command line.
(The file specification for the jacket routine is
/usr/opt/alt/usr/lib/support/mmap_32.c.)
If the mmap function is invoked from more than one source file, you
must use the method of creating an mmap_32c.o object module and
specifying it on a cc command line because including the jacket
routine in more than one module would generate linker errors.
Migrating Your ULTRIX Application to a DIGITAL UNIX System 7–11