General Purpose library for Freestanding C++ and POSIX systems
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.

16 lines
297 B

  1. #pragma once
  2. #include "gp/allocator/buddy.hpp"
  3. #include "gp/allocator/dummy.hpp"
  4. struct static_mapper {
  5. static gp::array<char, 4096> store;
  6. static gp::buddy<> impl;
  7. void* allocate(size_t sz) {
  8. return impl.allocate(sz);
  9. }
  10. bool deallocate(void* ptr) {
  11. return impl.deallocate(ptr);
  12. }
  13. };