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.

72 lines
952 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. --*/
  13. #ifndef _UTIL_
  14. #define _UTIL_
  15. #if 0
  16. void *operator new( unsigned int );
  17. void operator delete( void * );
  18. #endif // 0
  19. /*++
  20. Class Description:
  21. This class implements the MEMORY allocation object.
  22. Public Member functions:
  23. Alloc : allocates a block memory.
  24. Free : Frees a memory block that was allocated by the above alloc()
  25. member function.
  26. --*/
  27. class MEMORY {
  28. private:
  29. #if DBG
  30. DWORD _Count;
  31. DWORD _TotalSize;
  32. #endif
  33. public:
  34. MEMORY::MEMORY( VOID ) {
  35. #if DBG
  36. _Count = 0;
  37. _TotalSize = 0;
  38. #endif
  39. };
  40. PVOID Alloc( DWORD Size );
  41. PVOID ReAlloc( PVOID OldMemory, DWORD NewSize );
  42. VOID Free( PVOID MemoryPtr );
  43. };
  44. #endif // _UTIL_
  45.