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

rmfree Kernel Service

Purpose

Frees memory allocated by the rmalloc kernel service.

Syntax

#include <sys/types.h>
int rmfree (pointer, size)
caddr_t pointer
int size

Parameters

pointer Specifies the address of the area in memory to free.
size Specifies the size of the area in memory to free.

Description

The rmfree kernel service frees the area of memory pointed to by the pointer parameter in the contiguous real memory heap. This area of memory must be allocated with the rmalloc kernel service, and the pointer must be the pointer returned from the corresponding rmalloc kernel service call. Also, the size must be the same size that was used on the corresponding rmalloc call.

Any memory allocated in a prior rmalloc call must be explicitly freed with an rmfree call. This service can be called from the process environment only.

Return Values

0 Indicates successful completion.
-1 Indicates one of the following:
  • The area was not allocated by the rmalloc kernel service.
  • The heap was not initialized for memory allocation.

Implementation Specifics

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

Related Information

The rmalloc kernel service.


[ Previous | Next | Contents | Home | Search ]