heap_destroy Kernel Service

Purpose

Removes a heap.

Syntax

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

kerrno_t heap_destroy (heapattr_t heap, long flags);

Parameters

Item Description
heap The heap to destroy.
flags Must be zero.

Description

This service removes a heap and its internal resources from the system. There must be no outstanding allocations when a heap is destroyed.

Execution Environment

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

Return Values

Item Description
EINVAL_HEAP_DESTROY The heap parameter is not recognizable.
EBUSY_HEAP_DESTROY The heap is still in use.