Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1987-1990 **/
  4. /********************************************************************/
  5. #ifndef _HEAP_INCLUDED
  6. #define _HEAP_INCLUDED
  7. //static char *SCCSID = "@(#)heap.h 1.1 85/10/09";
  8. //
  9. // Shared Memory Heap Allocator include file
  10. //
  11. //
  12. // Constant definitions
  13. //
  14. #define INULL ((DWORD) -1)
  15. //
  16. // Structure and macro definitions
  17. //
  18. //
  19. // Heap Block Header
  20. //
  21. typedef struct blk {
  22. DWORD hp_size; // Size of block incl. header
  23. DWORD hp_flag; // Allocation flag
  24. }HEAPHDR, *PHEAPHDR, *LPHEAPHDR;
  25. #define HP_SIZE(x) (x).hp_size
  26. #define HP_FLAG(x) (x).hp_flag
  27. #define HPTR(x) ((LPHEAPHDR) &heap[(x)])
  28. #define CPTR(x) (&heap[(x)])
  29. #define Msgheapfree(x) HP_FLAG(*HPTR(x)) = 0
  30. //
  31. // Data
  32. //
  33. extern LPBYTE heap; // Pointer to start of heap
  34. extern DWORD heapln; // Length of heap
  35. //
  36. // Functions
  37. //
  38. DWORD
  39. Msgheapalloc(
  40. IN DWORD NumBytes
  41. );
  42. #endif // _HEAP_INCLUDED