Reset
Dynamic
Memory
Pool
minit
Syntax
#include
<stdlib.h>
void
minit()
Defined
in
memory.
c in
rts.
src
Description
The minit function resets all the space that was previously allocated by calls
to
themalloc.calloc.
or realloc functions.
Note:
Calling the minig function makes
all
the memory space in the heap
available again.
Any
objects
that
you
allocated
previously
will
be
lost;
don't
try
to
access
them.
The memory that minit
uses
is
in
a special memory pool or heap. A C mo-
dule called
memory.
c
reserves
memory for the heap
in
the .bss section. The
constant
MEMORY-SIZE
defines the size
of
the heap
as
1000
bytes.
If
nec-
essary,
you
can
change the size
of
the heap by change the value
of
MEMORY_SIZE
and reassembling
memory.
c.
For more information,
see
Section 5.1.3, Dynamic Memory Allocation, on page 5-4.
6-55