Adding New Versions to a Shared Library
To rebuild a shared library with new versions of some of the object files, use the aCC command and the
Standard
Location of Standard
The standard
Using Header Files
To use a system library function, your HP aC++ source code must include the preprocessor directive #include.
Example:
#include <filename.h>
where filename.h is the name of the C++ header file for the library function you want to use. By enclosing filename.h in angle brackets, the HP aC++ compiler looks for that particular header file in a standard location on the system. The compiler first looks for header files in /opt/ aCC/include directory. When no header files are found in this directory, it searches /usr/ includeUse header file options to modify the search path..
Example
To use the getenv function that is in the standard system libraries (/usr/lib/libc.so and /usr/lib/libc.a), specify:#include <stdlib.h>
because the external declaration of getenv is found in the header file /usr/include/stdlib.h.
Allocation Policies for Containers
By default, allocating memory for STL containers is optimized for large applications. Defaults have been tuned with speed efficiency as a primary concern. Space efficiency was considered, but was secondary. Typically, therefore, memory is not allocated as required, because this method is slow and inefficient. The containers obtain a block of memory to hold many elements, and when this fills up, they get another block. The size of the block depends on the element size. As a result, containers with only a few items might end up allocating too much memory. This default behavior can be adjusted to individual application needs.
For
The inline template function__rw_allocation_size can be explicitly specialized to return the number of units for each type’s use in any container:
template <>
inline size_t
}
This would initially allocate one unit when dealing with containers of type bar. Alternatively, if RWSTD_STRICT_ANSI is not defined, then container member functionallocation_size can be used to directly set buffer_size, the number of units to allocate.
184 Tools and Libraries