home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / malloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-13  |  1.5 KB  |  47 lines

  1. /*    @(#)malloc.h 1.4 89/06/25 SMI; from include/malloc.h 1.5    */
  2.  
  3. #ifndef    __malloc_h
  4. #define    __malloc_h
  5.  
  6. /*
  7.  *    Constants defining mallopt operations
  8.  */
  9. #define    M_MXFAST    1    /* set size of 'small blocks' */
  10. #define    M_NLBLKS    2    /* set num of small blocks in holding block */
  11. #define    M_GRAIN        3    /* set rounding factor for small blocks */
  12. #define    M_KEEP        4    /* (nop) retain contents of freed blocks */
  13.  
  14. /*
  15.  *    malloc information structure
  16.  */
  17. struct    mallinfo  {
  18.     int arena;    /* total space in arena */
  19.     int ordblks;    /* number of ordinary blocks */
  20.     int smblks;    /* number of small blocks */
  21.     int hblks;    /* number of holding blocks */
  22.     int hblkhd;    /* space in holding block headers */
  23.     int usmblks;    /* space in small blocks in use */
  24.     int fsmblks;    /* space in free small blocks */
  25.     int uordblks;    /* space in ordinary blocks in use */
  26.     int fordblks;    /* space in free ordinary blocks */
  27.     int keepcost;    /* cost of enabling keep option */
  28.  
  29.     int mxfast;    /* max size of small blocks */
  30.     int nlblks;    /* number of small blocks in a holding block */
  31.     int grain;    /* small block rounding factor */
  32.     int uordbytes;    /* space (including overhead) allocated in ord. blks */
  33.     int allocated;    /* number of ordinary blocks allocated */
  34.     int treeoverhead;    /* bytes used in maintaining the free tree */
  35. };
  36.  
  37. typedef    char *    malloc_t;
  38.  
  39. extern    malloc_t    calloc(/* size_t nmemb, size_t size */);
  40. extern    int        free(/* malloc_t ptr */);
  41. extern    malloc_t    malloc(/* size_t size */);
  42. extern    malloc_t    realloc(/* malloc_t ptr, size_t size */);
  43. extern    int        mallopt();
  44. extern    struct mallinfo mallinfo();
  45.  
  46. #endif    /* !__malloc_h */
  47.