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.

56 lines
687 B

  1. /*++
  2. Copyright (c) 1997-1998 Microsoft Corporation
  3. Module Name:
  4. memory.cpp
  5. Abstract:
  6. Implements heap management wrappers for use on process default heap
  7. Notes:
  8. Author:
  9. Vlad Sadovsky (VladS) 4/12/1999
  10. Environment:
  11. User Mode - Win32
  12. Revision History:
  13. 4/12/1999 VladS Created
  14. --*/
  15. VOID
  16. inline
  17. MemInit (
  18. IN HANDLE hHeap
  19. )
  20. {
  21. g_hHeap = hHeap;
  22. }
  23. LPVOID
  24. inline
  25. MemAlloc (
  26. IN DWORD dwFlags,
  27. IN SIZE_T dwBytes
  28. )
  29. {
  30. return HeapAlloc (g_hHeap, dwFlags, dwBytes);
  31. }
  32. BOOL
  33. inline
  34. MemFree (
  35. IN LPVOID pv
  36. )
  37. {
  38. return HeapFree (g_hHeap, 0, pv);
  39. }