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.

53 lines
663 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. MemInit (
  17. IN HANDLE hHeap
  18. )
  19. {
  20. g_hHeap = hHeap;
  21. }
  22. LPVOID
  23. MemAlloc (
  24. IN DWORD dwFlags,
  25. IN SIZE_T dwBytes
  26. )
  27. {
  28. return HeapAlloc (g_hHeap, dwFlags, dwBytes);
  29. }
  30. BOOL
  31. MemFree (
  32. IN LPVOID pv
  33. )
  34. {
  35. return HeapFree (g_hHeap, 0, pv);
  36. }