updated moo-xma.h
This commit is contained in:
parent
a22baf7ee8
commit
0d4afc137a
@ -37,8 +37,16 @@
|
|||||||
* See the example below. Note it omits error handling.
|
* See the example below. Note it omits error handling.
|
||||||
*
|
*
|
||||||
* @code
|
* @code
|
||||||
* #include <qse/cmn/xma.h>
|
* #include <moo-xma.h>
|
||||||
* #include <qse/cmn/stdio.h>
|
* #include <stdio.h>
|
||||||
|
* #include <stdarg.h>
|
||||||
|
* void dumper (void* ctx, const char* fmt, ...)
|
||||||
|
* {
|
||||||
|
* va_list ap;
|
||||||
|
* va_start (ap, fmt);
|
||||||
|
* vfprintf (fmt, ap);
|
||||||
|
* va_end (ap);
|
||||||
|
* }
|
||||||
* int main ()
|
* int main ()
|
||||||
* {
|
* {
|
||||||
* moo_xma_t* xma;
|
* moo_xma_t* xma;
|
||||||
@ -52,7 +60,7 @@
|
|||||||
* ptr2 = moo_xma_alloc(xma, 1000); // allocate a 1K block from the zone
|
* ptr2 = moo_xma_alloc(xma, 1000); // allocate a 1K block from the zone
|
||||||
* ptr1 = moo_xma_realloc(xma, ptr1, 6000); // resize the 5K block to 6K.
|
* ptr1 = moo_xma_realloc(xma, ptr1, 6000); // resize the 5K block to 6K.
|
||||||
*
|
*
|
||||||
* moo_xma_dump (xma, moo_fprintf, MOO_STDOUT); // dump memory blocks
|
* moo_xma_dump (xma, dumper, MOO_NULL); // dump memory blocks
|
||||||
*
|
*
|
||||||
* // the following two lines are not actually needed as the allocator
|
* // the following two lines are not actually needed as the allocator
|
||||||
* // is closed after them.
|
* // is closed after them.
|
||||||
|
Loading…
Reference in New Issue
Block a user