home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / malloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.0 KB  |  96 lines

  1. /*  malloc.h
  2.  
  3.     memory management functions and variables.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 10.0
  9.  *
  10.  *      Copyright (c) 1991, 2000 by Inprise Corporation
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. /* $Revision:   9.3  $ */
  16.  
  17. #ifndef __MALLOC_H
  18. #define __MALLOC_H
  19. #define _INC_MALLOC  /* MSC Guard name */
  20.  
  21. #include <alloc.h>
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. #if !defined(RC_INVOKED)
  28.  
  29. #if defined(__STDC__)
  30. #pragma warn -nak
  31. #endif
  32.  
  33. #endif  /* !RC_INVOKED */
  34.  
  35. #if !defined(RC_INVOKED)
  36. #pragma pack(push, 1)
  37. #endif
  38.  
  39. /* _HEAPINFO structure returned by heapwalk */
  40.  
  41. typedef struct _heapinfo
  42. {
  43.     int     *_pentry;
  44.     int     *__pentry;
  45.     _SIZE_T  _size;
  46.     int     _useflag;
  47. } _HEAPINFO;
  48.  
  49.  
  50. #if !defined(RC_INVOKED)
  51. /* restore default packing */
  52. #pragma pack(pop)
  53. #endif
  54.  
  55. /* Prototypes */
  56.  
  57. void *      __cdecl   _EXPFUNC alloca( _SIZE_T __size );
  58. void *      __cdecl            __alloca__ (_SIZE_T __size);
  59.  
  60. #if (__CGVER__ >= 0x200)
  61. #  define alloca(__size)       __alloca__(__size)
  62. #  define _alloca(__size)      __alloca__(__size)  /* MSC compatible version */
  63. #else
  64. #  define _alloca alloca                           /* MSC compatible version */
  65. #endif
  66.  
  67. _SIZE_T      _RTLENTRY _EXPFUNC stackavail  (void);
  68. int         _RTLENTRY _EXPFUNC _heapadd    (void * __block, _SIZE_T __size);
  69. int         _RTLENTRY _EXPFUNC _heapchk    (void);
  70. int         _RTLENTRY _EXPFUNC _heapmin    (void);
  71. int         _RTLENTRY _EXPFUNC _heapset    (unsigned int __fill);
  72. int         _RTLENTRY _EXPFUNC _heapwalk   (_HEAPINFO *__entry);
  73. int         _RTLENTRY _EXPFUNC _rtl_heapwalk (_HEAPINFO *__entry);
  74. void *      _RTLENTRY _EXPFUNC _expand     (void * __block, _SIZE_T __size);
  75. _SIZE_T      _RTLENTRY _EXPFUNC _msize      (void * __block );
  76.  
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80.  
  81. /* Obsolete functions */
  82. #if !defined(RC_INVOKED)
  83. #pragma obsolete _heapwalk
  84. #endif
  85.  
  86. #if !defined(RC_INVOKED)
  87.  
  88. #if defined(__STDC__)
  89. #pragma warn .nak
  90. #endif
  91.  
  92. #endif  /* !RC_INVOKED */
  93.  
  94.  
  95. #endif  /* __MALLOC_H */
  96.