General Purpose library for Freestanding C++ and POSIX systems
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

32 行
493 B

#pragma once
#include <stddef.h>
#include "gp/utils/allocators/allocator.hpp"
namespace gp {
struct dummy_allocator : public allocator {
/**
* @return nullptr, always
*/
virtual void* allocate(size_t)
{
return nullptr;
}
/**
* @return false, always
*/
virtual bool deallocate(void*)
{
return false;
}
/**
* @return false, always
*/
virtual bool try_reallocate(void*, size_t) {
return false;
}
virtual ~dummy_allocator() = default;
};
}