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.

73 lines
861 B

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1999
  3. Module Name:
  4. memory.cxx
  5. Abstract:
  6. This file contains common routines for memory allocation in SENS.
  7. Author:
  8. Gopal Parupudi <GopalP>
  9. [Notes:]
  10. optional-notes
  11. Revision History:
  12. GopalP 10/30/1997 Start.
  13. --*/
  14. #include <precomp.hxx>
  15. extern HANDLE ghSensHeap;
  16. void * __cdecl
  17. operator new(
  18. IN size_t size
  19. )
  20. {
  21. return (HeapAlloc(ghSensHeap, 0, size));
  22. }
  23. void __cdecl
  24. operator delete(
  25. IN void * lpvObj
  26. )
  27. {
  28. HeapFree(ghSensHeap, 0, lpvObj);
  29. }
  30. extern "C" void __RPC_FAR * __RPC_API
  31. MIDL_user_allocate(
  32. IN size_t len
  33. )
  34. {
  35. return (new char[len]);
  36. }
  37. extern "C" void __RPC_API
  38. MIDL_user_free(
  39. IN void __RPC_FAR * ptr
  40. )
  41. {
  42. delete ptr;
  43. }