as_geth64 Kernel Service


Obtains a handle to the virtual memory object for the specified address.


#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
#include <sys/adspace.h>

vmhandle_t as_geth64 (addr64)
unsigned   long long addr64;


addr64 Specifies the virtual memory address for which the corresponding handle should be returned.


The as_geth64 kernel service is used to obtain a handle to the virtual memory object corresponding to the input address (addr64). This handle can then be used with the as_att64 or vm_att kernel service to make the object addressable at a different location.

After the last use of the handle and after it is detached accordingly, the as_puth64 kernel service must be used to indicate this fact. Failure to call the as_puth64 service may result in resources being permanently unavailable for re-use.

If the handle returned refers to a virtual memory segment, then that segment is protected from deletion until the as_puth64 kernel service is called.

If, for some reason, it is known that the virtual memory object cannot be deleted, then the as_getsrval64 kernel service may be used instead of the as_geth64 service.

The as_geth64 kernel service assumes an address space model of fixed-size virtual memory objects.

This service will operate correctly for both 32-bit and 64-bit user address spaces. It will also work for kernel processes (kprocs).

Note: This service only operates on the current process's address space. It is not allowed to operate on another address space.

Execution Environment

The as_geth64 kernel service can be called from the process environment only.

Return Values

On successful completion, this routine returns the appropriate handle.

On error, this routine returns the value INVLSID defined in sys/seg.h. This is caused by an address out of range.

Errors include: Input address out of range.

Implementation Specifics

The as_geth64 kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The as_att64 kernel service, as_seth64 kernel service, as_det64 kernel service, as_getsrval64 kernel service, and as_puth64 kernel service.