Get information about a typed memory object
#include <sys/mman.h> int posix_typed_mem_get_info( int fildes, struct posix_typed_mem_info *info);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The posix_typed_mem_get_info() function queries the typed memory object to obtain the amount of memory currently available. This is particularly important for typed memory objects that may in some cases be scarce resources.
The posix_typed_mem_get_info() function stores, in the posix_tmi_length field of the posix_typed_mem_info structure pointed to by info, the maximum length that may be successfully allocated by the typed memory object designated by fildes.
The maximum length is dynamic; it's valid only while the current mapping of the corresponding typed memory pool remains unchanged. It takes into account the POSIX_TYPED_MEM_ALLOCATE or POSIX_TYPED_MEM_ALLOCATE_CONTIG flag specified when the typed memory object was opened.
As a QNX Neutrino extension, if fildes represents a typed memory object opened with neither POSIX_TYPED_MEM_ALLOCATE nor POSIX_TYPED_MEM_ALLOCATE_CONTIG, the function sets info->posix_tmi_length to 0.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |