[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

vm_gfree Kernel Service

Purpose

Frees a region of global memory in the kernel previously allocated with the vm_galloc kernel service.

Syntax


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

int vm_gfree (ulong eaddr, vmsize_t size)

Description

The vm_gfree kernel service frees up a global memory region previously allocated with the vm_galloc kernel service. The start address and size must exactly match what was previously allocated by the vm_galloc kernel service. It is not valid to free part of a previously allocated region in the vm_galloc area.

Any I/O to or from the region being freed up must be quiesced before calling the vm_gfree kernel service.

Parameters

eaddr Start address of the region to free.
size Size in bytes of the region to free.

Execution Environment

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

Return Values

0 Successful completion. The region was freed.
EINVAL Invalid size or start address specified. This could mean that the region is out of range of the vm_galloc heap, was not previously allocated with vm_galloc, or does not exactly match a previous allocation from vm_galloc.

Related Information

The vm_galloc kernel service.

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

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]