◆ AllocatedData() [1/3]
| duckdb::AllocatedData::AllocatedData |
( |
| ) |
|
32314 : allocator(nullptr), pointer(nullptr), allocated_size(0) {
32315}
◆ AllocatedData() [2/3]
| duckdb::AllocatedData::AllocatedData |
( |
Allocator & |
allocator, |
|
|
data_ptr_t |
pointer, |
|
|
idx_t |
allocated_size |
|
) |
| |
32318 : allocator(&allocator), pointer(pointer), allocated_size(allocated_size) {
32319 if (!pointer) {
32320 throw InternalException("AllocatedData object constructed with nullptr");
32321 }
32322}
◆ ~AllocatedData()
| duckdb::AllocatedData::~AllocatedData |
( |
| ) |
|
32323 {
32324 Reset();
32325}
◆ AllocatedData() [3/3]
enable move constructors
32328 : allocator(other.allocator), pointer(nullptr), allocated_size(0) {
32329 std::swap(pointer, other.pointer);
32330 std::swap(allocated_size, other.allocated_size);
32331}
◆ operator=()
32333 {
32334 std::swap(allocator, other.allocator);
32335 std::swap(pointer, other.pointer);
32336 std::swap(allocated_size, other.allocated_size);
32337 return *this;
32338}
◆ get() [1/2]
| data_ptr_t duckdb::AllocatedData::get |
( |
| ) |
|
|
inline |
8616 {
8617 return pointer;
8618 }
◆ operator bool()
| duckdb::AllocatedData::operator bool |
( |
| ) |
const |
|
inline |
8619 {
8620 return pointer != nullptr;
8621 }
◆ get() [2/2]
| const_data_ptr_t duckdb::AllocatedData::get |
( |
| ) |
const |
|
inline |
8622 {
8623 return pointer;
8624 }
◆ GetSize()
| idx_t duckdb::AllocatedData::GetSize |
( |
| ) |
const |
|
inline |
8625 {
8626 return allocated_size;
8627 }
◆ IsSet()
| bool duckdb::AllocatedData::IsSet |
( |
| ) |
|
|
inline |
8628 {
8629 return pointer;
8630 }
◆ GetAllocator()
8631 {
8632 return allocator;
8633 }
◆ Reset()
| void duckdb::AllocatedData::Reset |
( |
| ) |
|
32340 {
32341 if (!pointer) {
32342 return;
32343 }
32344 D_ASSERT(allocator);
32345 allocator->FreeData(pointer, allocated_size);
32346 allocated_size = 0;
32347 pointer = nullptr;
32348}
The documentation for this class was generated from the following files:
- external/duckdb/duckdb.hpp
- external/duckdb/duckdb.cpp