as_det Kernel Service


Unmaps and deallocates a region in the specified address space that was mapped with the as_att kernel service.


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

int as_det ( adspacep, eaddr)
adspace_t *adspacep;
caddr_t eaddr;


adspacep Points to the address space structure that defines the address space where the region for the virtual memory object is defined. For the current process, the getadsp kernel service can obtain this pointer.
eaddr Specifies the effective address within the region to be deallocated in the specified address space.


The as_det kernel service unmaps the virtual memory object from the region containing the specified effective address (specified by the eaddr parameter) and deallocates the region from the address space specified by the adspacep parameter. This region is added to the free list for the specified address space.

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

Note: This service should not be used to deallocate a base kernel region, process text, process private or unallocated region: an EINVAL return code will result. For this system, the upper 4 bits of the eaddr effective address parameter must never be 0, 1, 2, 0xE, or specify an unallocated region.

Execution Environment

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

Return Values

0 The region was successfully unmapped and deallocated.
EINVAL An attempt was made to deallocate a region that should not have been deallocated (that is, a base kernel region, process text region, process private region, or unallocated region).

Implementation Specifics

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

Related Information

The as_att kernel service, getadsp kernel service.

Memory Kernel Services and Understanding Virtual Memory Manager Interfaces in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.