[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vms_create Kernel Service

Purpose

Creates a virtual memory object of the specified type, size, and limits.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>
int vms_create (vmid, type, gn, size, uplim, downlim)
vmid_t *vmid;
int  type;
struct gnode *gn;
int  size;
int  uplim;
int  downlim;

Parameters

vmid Points to the variable in which the virtual memory object identifier is to be stored.
type Specifies the virtual memory object type and options as an OR of bits. The type parameter must have the value of V_CLIENT. The V_INTRSEG flag specifies if the process can be interrupted from a page wait on this object.
gn Specifies the address of the g-node for client storage.
size Specifies the current size of the file. This can be any valid file size.
uplim Ignored. The enforcement of file size limits is done by comparing with the u_limit value in the u block.
downlim Ignored.

Description

The vms_create kernel service creates a virtual memory object. The resulting virtual memory object identifier is passed back by reference in the vmid parameter.

The size parameter is used to determine the size in units of bytes of the virtual memory object to be created. This parameter sets an internal variable that determines the virtual memory range to be processed when the virtual memory object is deleted.

An entry for the file system is required in the paging device table when the vms_create kernel service is called.

Execution Environment

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

Return Values

0 Indicates a successful operation.
ENOMEM Indicates that no space is available for the virtual memory object.
ENODEV Indicates no entry for the file system in the paging device table.
EINVAL Indicates incompatible or bad parameters.

Implementation Specifics

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

Related Information

The vms_delete kernel service.

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


[ Previous | Next | Contents | Home | Search ]