Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 8
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);
- fildes
- The file descriptor for the typed memory object that you want to query,
returned by a call to
posix_typed_mem_open().
- info
- A pointer to a posix_typed_mem_info structure where the
function can store the information.
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.
|
This function was added in the QNX Neutrino Core OS 6.3.2. |
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.
|
If the typed memory pool is a shared
resource, some form of mutual-exclusion or synchronization may be
required while querying and allocating it, to prevent
race conditions. |
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 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.
- 0
- Success.
- EBADF
- The fildes argument isn't a valid open file descriptor.
- ENODEV
- The fildes isn't connected to a memory object supported by
this function.
POSIX 1003.1 TYM
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
posix_mem_offset(),
posix_typed_mem_open()
“Typed memory”
in the Interprocess Communication (IPC) chapter of the
System Architecture guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 189
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/posix_typed_mem_get_info.html on line 189