Source code of Windows XP (NT5)
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.

74 lines
1013 B

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. util.hxx
  5. Abstract:
  6. Contains the class definition of UTILITY classes.
  7. Author:
  8. Madan Appiah (madana) 16-Nov-1994
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. Sean Woodward (t-seanwo) 26-October-1997 ADSI Update
  13. --*/
  14. #ifndef _UTIL_
  15. #define _UTIL_
  16. #if 0
  17. void *operator new( unsigned int );
  18. void operator delete( void * );
  19. #endif // 0
  20. /*++
  21. Class Description:
  22. This class implements the MEMORY allocation object.
  23. Public Member functions:
  24. Alloc : allocates a block memory.
  25. Free : Frees a memory block that was allocated by the above alloc()
  26. member function.
  27. --*/
  28. class MEMORY {
  29. private:
  30. #if DBG
  31. DWORD _Count;
  32. DWORD _TotalSize;
  33. #endif
  34. public:
  35. MEMORY::MEMORY( VOID ) {
  36. #if DBG
  37. _Count = 0;
  38. _TotalSize = 0;
  39. #endif
  40. };
  41. PVOID Alloc( DWORD Size );
  42. PVOID ReAlloc( PVOID OldMemory, DWORD NewSize );
  43. VOID Free( PVOID MemoryPtr );
  44. };
  45. #endif // _UTIL_
  46.