heap_modify Kernel Service

Purpose

Modifies the attributes of a heap.

Syntax

#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/kerrno.h>

kerrno_t heap_modify (heapattr_t heap, long command, long argument);

Parameters

Item Description
heap The heap handle returned from the heap_create kernel service.
command Specifies the operation to perform. The following values are supported:
HPA_SET_LIMIT
Modifies the limit value of a private heap.
HPA_SET_DEBUG
Modifies the debug level. Debug levels from 0 to 9 are supported.
argument Command specific data (new limit or debug level).

Description

The heap_modify kernel service is used to alter the heap characteristics at run time.

Execution Environment

The heap_modify kernel service can be called from the process environment only with interrupts enabled.

Return Values

Item Description
0 Success.
EINVAL_HEAP_MODIFY The command or the execution environment is not valid.
ERANGE_HEAP_MODIFY Heap property is outside the supported range.