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.

66 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. cmem.hxx
  5. Abstract:
  6. The class CONT_MEM is an implementation of the class MEM which uses the
  7. memory resources given to it on initialization. Successive calls
  8. to Acquire will return successive portions of the memory given
  9. to it on initialization.
  10. Author:
  11. Norbert P. Kusters (norbertk) 26-Nov-90
  12. --*/
  13. #if !defined( _CONT_MEM_DEFN_ )
  14. #define _CONT_MEM_DEFN_
  15. #include "mem.hxx"
  16. DECLARE_CLASS( CONT_MEM );
  17. class CONT_MEM : public MEM {
  18. public:
  19. ULIB_EXPORT
  20. DECLARE_CONSTRUCTOR( CONT_MEM );
  21. NONVIRTUAL
  22. ULIB_EXPORT
  23. BOOLEAN
  24. Initialize(
  25. IN PVOID Buffer,
  26. IN ULONG Size
  27. );
  28. VIRTUAL
  29. ULIB_EXPORT
  30. PVOID
  31. Acquire(
  32. IN ULONG Size,
  33. IN ULONG AlignmentMask DEFAULT 0
  34. );
  35. private:
  36. NONVIRTUAL
  37. VOID
  38. Construct (
  39. );
  40. PVOID _buf;
  41. ULONG _size;
  42. };
  43. #endif // _CONT_MEM_DEFN_