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.

55 lines
1.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: rpcalloc.cxx
  7. //
  8. // Contents: functions for RPC memory allocation
  9. //
  10. // Functions: MIDL_user_allocate
  11. // MIDL_user_free
  12. //
  13. // History: 24-Apr-93 Ricksa Created
  14. //
  15. //--------------------------------------------------------------------------
  16. #include "act.hxx"
  17. //+-------------------------------------------------------------------------
  18. //
  19. // Function: MIDL_user_allocate
  20. //
  21. // Synopsis: Allocate memory for RPC
  22. //
  23. // Arguments: [cNeeded] - bytes needed
  24. //
  25. // Returns: Pointer to block allocated
  26. //
  27. // History: 24-Apr-93 Ricksa Created
  28. // 17-Feb-94 AlexT Use PrivMemAlloc
  29. //
  30. //--------------------------------------------------------------------------
  31. extern "C" void * __RPC_API MIDL_user_allocate(size_t cb)
  32. {
  33. return(PrivMemAlloc8(cb));
  34. }
  35. //+-------------------------------------------------------------------------
  36. //
  37. // Function: MIDL_user_free
  38. //
  39. // Synopsis: Free memory allocated by call above
  40. //
  41. // Arguments: [pv] - memory block to free
  42. //
  43. // History: 24-Apr-93 Ricksa Created
  44. // 17-Feb-94 AlexT Use PrivMemFree
  45. //
  46. //--------------------------------------------------------------------------
  47. extern "C" void __RPC_API MIDL_user_free(void *pv)
  48. {
  49. PrivMemFree(pv);
  50. }