BlockAllocator.h 407 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2021-2023, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Vector.h>
  8. #include <LibJS/Forward.h>
  9. namespace JS {
  10. class BlockAllocator {
  11. public:
  12. BlockAllocator() = default;
  13. ~BlockAllocator();
  14. void* allocate_block(char const* name);
  15. void deallocate_block(void*);
  16. private:
  17. Vector<void*> m_blocks;
  18. };
  19. }