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.

38 lines
1.1 KiB

  1. /*++ BUILD Version: 0001
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WHEAP.H
  8. * WOW32 Heap Support (Instead of using malloc/free from CRT)
  9. *
  10. * History:
  11. * Created 13-Dec-1991 by Sudeep Bharati (sudeepb)
  12. --*/
  13. //
  14. // Dynamic memory macros
  15. //
  16. // On checked (debug) builds, malloc_w and friends complain when they fail.
  17. //
  18. PVOID FASTCALL malloc_w(ULONG size);
  19. DWORD FASTCALL size_w (PVOID pv);
  20. PVOID FASTCALL malloc_w_zero (ULONG size);
  21. PVOID FASTCALL realloc_w (PVOID p, ULONG size, DWORD dwFlags);
  22. VOID FASTCALL free_w(PVOID p);
  23. LPSTR malloc_w_strcpy_vp16to32(VPVOID vpstr16, BOOL fMulti, INT cMax);
  24. PVOID FASTCALL malloc_w_or_die(ULONG size);
  25. #define INITIAL_WOW_HEAP_SIZE 32*1024 // 32k
  26. #define GROW_HEAP_AS_NEEDED 0 // grow heap as needed
  27. //*****************************************************************************
  28. // Small Heap -
  29. //*****************************************************************************
  30. BOOL FASTCALL CreateSmallHeap(VOID);
  31. PVOID FASTCALL malloc_w_small (ULONG size);
  32. BOOL FASTCALL free_w_small(PVOID p);