02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

malloe(3C) malloe(3C)<br />

realloe also works if ptr points to a block freed since the last<br />

call of malloe, realloe, or ealloe; thus sequences of free,<br />

malloe, and realloe can exploit the search strategy of malloe<br />

to do storage compaction.<br />

ealloe allocates space for an array of nelem elements of size elsize.<br />

The space is initialized to zeros.<br />

The arguments to efree are the pointer to a block previously allocated<br />

by ealloc plus the parameters to ealloe.<br />

Each of the allocation routines returns a pointer to space suitably<br />

aligned (after possible pointer coercion) for storage of any type of<br />

object<br />

RETURN VALUE<br />

malloe, realloe, and ealloe return a NULL pointer if there<br />

is no available memory or if the arena is deteected to have been<br />

corrupted by storing outside the bounds of a block. When this<br />

happens the block pointed to by ptr may be destroyed.<br />

NOTES<br />

Search time increases when many objects have been allocated;<br />

that is, if a program allocates space but never frees it, each successive<br />

allocation takes longer.<br />

SEE ALSO<br />

brk(2), malloe(3X).<br />

2 February, 1990<br />

RevisionC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!