General Purpose library for Freestanding C++ and POSIX systems
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

22 wiersze
367 B

4 lat temu
4 lat temu
4 lat temu
4 lat temu
4 lat temu
4 lat temu
4 lat temu
  1. #pragma once
  2. #include <stddef.h>
  3. #include "gp/allocator/allocator.hpp"
  4. namespace gp {
  5. struct dummy_allocator : public allocator {
  6. virtual void* allocate(size_t)
  7. {
  8. return nullptr;
  9. }
  10. virtual bool deallocate(void*)
  11. {
  12. return false;
  13. }
  14. virtual bool try_reallocate(void*, size_t) {
  15. return false;
  16. }
  17. virtual ~dummy_allocator() = default;
  18. };
  19. }