home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / malloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  1.9 KB  |  95 lines

  1. /***
  2. *malloc.h - declarations and definitions for memory allocation functions
  3. *
  4. *    Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *    Contains the function declarations for memory allocation functions;
  8. *    also defines manifest constants and types used by the heap routines.
  9. *    [System V]
  10. *
  11. ****/
  12.  
  13. #ifndef _INC_MALLOC
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19.  
  20. #ifndef _CRTIMP
  21. #ifdef _DLL
  22. #define _CRTIMP __declspec(dllimport)
  23. #else
  24. #define _CRTIMP
  25. #endif
  26. #endif
  27.  
  28.  
  29. #ifndef _SIZE_T_DEFINED
  30. typedef unsigned int size_t;
  31. #define _SIZE_T_DEFINED
  32. #endif
  33.  
  34. /* maximum heap request that can ever be honored */
  35. #define _HEAP_MAXREQ    0xFFFFFFD8
  36.  
  37. /* constants for _heapchk/_heapset/_heapwalk routines */
  38. #define _HEAPEMPTY    (-1)
  39. #define _HEAPOK     (-2)
  40. #define _HEAPBADBEGIN    (-3)
  41. #define _HEAPBADNODE    (-4)
  42. #define _HEAPEND    (-5)
  43. #define _HEAPBADPTR    (-6)
  44. #define _FREEENTRY    0
  45. #define _USEDENTRY    1
  46.  
  47. #ifndef _HEAPINFO_DEFINED
  48. typedef struct _heapinfo {
  49.     int * _pentry;
  50.     size_t _size;
  51.     int _useflag;
  52.     } _HEAPINFO;
  53. #define _HEAPINFO_DEFINED
  54. #endif
  55.  
  56. /* external variable declarations */
  57.  
  58. extern unsigned int _amblksiz;
  59.  
  60.  
  61. /* function prototypes */
  62. _CRTIMP void   __cdecl free(void *);
  63. _CRTIMP void * __cdecl malloc(size_t);
  64. _CRTIMP size_t __cdecl _msize(void *);
  65. _CRTIMP void * __cdecl realloc(void *, size_t);
  66.  
  67. void * __cdecl _alloca(size_t);
  68.  
  69. #ifndef UNDER_CE
  70.  
  71. _CRTIMP void * __cdecl calloc(size_t, size_t);
  72.  
  73. _CRTIMP void * __cdecl _expand(void *, size_t);
  74.  
  75. _CRTIMP int __cdecl _heapadd(void *, size_t);
  76. _CRTIMP int __cdecl _heapchk(void);
  77. _CRTIMP int __cdecl _heapmin(void);
  78. _CRTIMP int __cdecl _heapset(unsigned int);
  79. _CRTIMP int __cdecl _heapwalk(_HEAPINFO *);
  80.  
  81. #endif    /* UNDER_CE */
  82.  
  83. #if !__STDC__
  84. /* Non-ANSI names for compatibility */
  85. #define alloca    _alloca
  86. #endif    /* __STDC__*/
  87.  
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92.  
  93. #define _INC_MALLOC
  94. #endif    /* _INC_MALLOC */
  95.