用于保留主机内存分配的单例类。 更多...
#include <bounce_buffer.hpp>
类 | |
class | Alloc |
主机内存分配。 更多... | |
公有成员函数 | |
Alloc | get () |
void | put (void *alloc, std::size_t size) |
std::size_t | clear () |
释放所有保留的分配。 更多... | |
AllocRetain (AllocRetain const &)=delete | |
AllocRetain & | operator= (AllocRetain const &)=delete |
AllocRetain (AllocRetain &&o)=delete | |
AllocRetain & | operator= (AllocRetain &&o)=delete |
公有静态成员函数 | |
static KVIKIO_EXPORT AllocRetain & | instance () |
用于保留主机内存分配的单例类。
调用 AllocRetain::get
以获取在超出范围(RAII)时将被保留的分配。所有保留分配的大小都相同。
定义于文件 bounce_buffer.hpp 的 30 行。
std::size_t kvikio::AllocRetain::clear | ( | ) |
释放所有保留的分配。