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.

57 lines
1.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT Security
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. //
  6. // File: memory.cpp
  7. //
  8. // Contents: Crypt32 Memory Management Routines
  9. //
  10. // History: 22-Jul-97 kirtd Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #include <global.hxx>
  14. //+---------------------------------------------------------------------------
  15. //
  16. // Function: CryptMemAlloc
  17. //
  18. // Synopsis: Allocates memory
  19. //
  20. //----------------------------------------------------------------------------
  21. LPVOID WINAPI CryptMemAlloc (
  22. IN ULONG cbSize
  23. )
  24. {
  25. return( malloc( cbSize ) );
  26. }
  27. //+---------------------------------------------------------------------------
  28. //
  29. // Function: CryptMemRealloc
  30. //
  31. // Synopsis: reallocates memory
  32. //
  33. //----------------------------------------------------------------------------
  34. LPVOID WINAPI CryptMemRealloc (
  35. IN LPVOID pv,
  36. IN ULONG cbSize
  37. )
  38. {
  39. return( realloc( pv, cbSize ) );
  40. }
  41. //+---------------------------------------------------------------------------
  42. //
  43. // Function: CryptMemFree
  44. //
  45. // Synopsis: free memory
  46. //
  47. //----------------------------------------------------------------------------
  48. VOID WINAPI CryptMemFree (
  49. IN LPVOID pv
  50. )
  51. {
  52. free( pv );
  53. }