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.

62 lines
1.0 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. --*/
  11. #if !defined( _CONT_MEM_DEFN_ )
  12. #define _CONT_MEM_DEFN_
  13. #include "mem.hxx"
  14. DECLARE_CLASS( CONT_MEM );
  15. class CONT_MEM : public MEM {
  16. public:
  17. ULIB_EXPORT
  18. DECLARE_CONSTRUCTOR( CONT_MEM );
  19. NONVIRTUAL
  20. ULIB_EXPORT
  21. BOOLEAN
  22. Initialize(
  23. IN PVOID Buffer,
  24. IN ULONG Size
  25. );
  26. VIRTUAL
  27. ULIB_EXPORT
  28. PVOID
  29. Acquire(
  30. IN ULONG Size,
  31. IN ULONG AlignmentMask DEFAULT 0
  32. );
  33. private:
  34. NONVIRTUAL
  35. VOID
  36. Construct (
  37. );
  38. PVOID _buf;
  39. ULONG _size;
  40. };
  41. #endif // _CONT_MEM_DEFN_