7 // SWIG file for memory management functions
 
   8 // (also contained in stdlib.i)
 
  12  * Revision 1.1  2002/04/29 19:56:49  RD
 
  13  * Since I have made several changes to SWIG over the years to accomodate
 
  14  * special cases and other things in wxPython, and since I plan on making
 
  15  * several more, I've decided to put the SWIG sources in wxPython's CVS
 
  16  * instead of relying on maintaining patches.  This effectivly becomes a
 
  17  * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
 
  18  * doesn't have some things I rely on in 1.1, not to mention that my
 
  19  * custom patches would all have to be redone, I felt that this is the
 
  20  * easier road to take.
 
  22  * Revision 1.1.1.1  1999/02/28 02:00:53  beazley
 
  25  * Revision 1.1  1996/05/22 17:27:01  beazley
 
  35 %section "Memory Allocation Module",
 
  36          pre,info,after,nosort,chop_left=3,chop_right=0,chop_top=0,chop_bottom=0,skip=1
 
  41 This module provides access to a few basic C memory management functions.
 
  42 All functions return void pointers, but realloc() and free() will operate
 
  43 on any sort of pointer.   Sizes should be specified in bytes.
 
  46 void  *calloc(unsigned nobj, unsigned size);
 
  47 /* Returns a pointer to a space for an array of nobj objects, each with
 
  48    size bytes.   Returns NULL if the request can't be satisfied. 
 
  49    Initializes the space to zero bytes. */
 
  51 void  *malloc(unsigned size);
 
  52 /* Returns a pointer to space for an object of size bytes.  Returns NULL
 
  55 void  *realloc(void *ptr, unsigned size);
 
  56 /* Changes the size of the object pointed to by ptr to size bytes. 
 
  57    The contents will be unchanged up the minimum of the old and new
 
  58    sizes.  Returns a pointer to the new space of NULL upon failure,
 
  59    in which case *ptr is unchanged. */
 
  62 /* Deallocates the space pointed to by ptr.  Does nothing if ptr is NULL.
 
  63    ptr must be a space previously allocated by calloc, malloc, or realloc. */