IMAP(3)
HP-UX
NAME
imapinfo − return mapping hardware constraints imposed by an I/O interface.
SYNOPSIS
#include <sicl.h>
int imapinfo(INST id, int map_space, int *numwindows, int *winsize);
DESCRIPTION
Imapinfo will report the number of hardware map windows available for the map_space on the interface associated with id and the size of those windows. The *numwindows parameter is filled in with the total number of windows available on this interface card (notice that some of them may be in use by other processes). The *winsize parameter specifies the size of those windows in pages (where the page size id dependent on the address space specified by map_space). Note that if the windows are each of a different size, the winsize value will specify the size of the smallest window.
The only allowed values for the map_space parameter to imapinfo are:
I_MAP_A16 I_MAP_A24 I_MAP_A32.
Processes that map a memory space should unmap it as soon as it is no longer needed, as this map may take hardware resources away from other processes.
If a session that has a memory segment mapped (i.e. an imap without a corresponding iunmap) calls iclose, an implicit iunmap will be performed to remove that memory segment. Since process termination causes an implicit iclose to occur for all open sessions, then process termination will also cause an iunmap to be performed for all mapped memory segments.
RETURN VALUE
imapinfo returns (0) if successful, or a non-zero error code if an error was encountered.
ERRORS
imapinfo fails under the following circumstances, and sets the return value to one of the following:
[I_ERR_NORSRC] Out of system resources
[I_ERR_NOINTF] Interface is not active
[I_ERR_NODEV] Device is not active
[I_ERR_BADID] The INST id is invalid
[I_ERR_BADADDR] Invalid address (device/interface doesn’t exist)
SEE ALSO
AUTHOR
imapinfo were developed by HP.
Hewlett-Packard Company — September 29, 1999