General Purpose library for Freestanding C++ and POSIX systems
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

16 rader
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. };