Commit 61924a99 authored by Dan Egnor's avatar Dan Egnor
Browse files

Clarify allocation hooks

parent e84f2c63
......@@ -29,9 +29,9 @@ extern void (*oop_free)(void *ptr); /* <em>Free allocated memory.</em> */
These are global function pointers, initialized by default to the standard C
library functions <em>malloc</em>, <em>realloc</em>, and <em>free</em>.
Applications using liboop may reset these pointers to allocation and
deallocation routines with a compatible interface; components should use
deallocation routines with a compatible interface; libraries should use
these function pointers wherever possible to allocate and release memory.
These pointers are normally set before calling any liboop components; if they
These pointers are normally set before calling any liboop code; if they
are changed during operation, the new <em>oop_free</em> and
<em>oop_realloc</em> functions should be
capable of handling memory obtained with the old <em>oop_malloc</em>.
......
......@@ -11,7 +11,7 @@
<pre>
#include &lt;oop.h&gt;
/* <em>For recommended use by oop components.</em> */
/* <em>Applications can set these; liboop libraries will use them.</em> */
extern void *(*<a href="alloc">oop_malloc</a>)(size_t); /* <em>returns NULL on failure</em> */
extern void *(*<a href="alloc">oop_realloc</a>)(void *,size_t); /* <em>returns NULL on failure</em> */
extern void (*<a href="alloc">oop_free</a>)(void *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment