INtime SDK Help
mpool_delete
INtime SDK v7 > About INtime > Other system libraries > Heaps and memory pools > Memory pools > mpool_delete

Deletes a memory pool and frees all its resources.

BOOLEAN mpool_delete(
    MPOOL pool
);

Parameters

pool
The memory pool created by mpool_create.

Remarks

If a dynamic pool is deleted, all its pages become invalid and unmapped from the user's address space. Reference to invalid pages via stale pointers generates a page fault. Static pools do not necessarily have this protection since disposal of the buffer space is not under control of the mpool API.

Return Values

TRUE
Success.
FALSE
Failure. The function sets errno to one of these values:
EEXIST The pool is deleted.
EINVAL The pool is not a valid MPOOL.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/rt/include/mpool.h mpool.h clib.lib
   
See Also