|
Open3D (C++ API)
0.19.0
|
Public Member Functions | |
| MemoryCache ()=default | |
| MemoryCache (const MemoryCache &)=delete | |
| MemoryCache & | operator= (const MemoryCache &)=delete |
| void * | Malloc (size_t byte_size) |
| void | Free (void *ptr) |
| void | Acquire (void *ptr, size_t byte_size, const std::shared_ptr< MemoryManagerDevice > &device_mm) |
| Acquires ownership of the new real allocated blocks. | |
| std::vector< std::pair< void *, std::shared_ptr< MemoryManagerDevice > > > | Release (size_t byte_size) |
| std::vector< std::pair< void *, std::shared_ptr< MemoryManagerDevice > > > | ReleaseAll () |
| Releases ownership of all unused real allocated blocks. | |
| size_t | Size () const |
| Returns the number of allocated real blocks. | |
| bool | Empty () const |
| True if the set of allocated real blocks is empty, false otherwise. | |
Static Public Member Functions | |
| static size_t | AlignByteSize (size_t byte_size, size_t alignment=8) |
|
default |
|
delete |
|
inline |
Acquires ownership of the new real allocated blocks.
|
inlinestatic |
Computes an internal byte size that ensures a proper alignment of the real and virtual blocks.
|
inline |
True if the set of allocated real blocks is empty, false otherwise.
|
inline |
Frees memory by moving the corresponding block to the set of free virtual blocks. Consecutive free virtual blocks belonging to the same real block are merged together.
|
inline |
Allocates memory from the set of free virtual blocks. Returns nullptr if no suitable block was found.
|
delete |
|
inline |
Releases ownership of unused real allocated blocks whose sizes sum up to the requested byte size. Strategy:
|
inline |
Releases ownership of all unused real allocated blocks.
|
inline |
Returns the number of allocated real blocks.