![]() |
MySQL 9.5.0
Source Code Documentation
|
A bucket of memory blocks of the given size. More...
Public Member Functions | |
| Bucket ()=delete | |
| Bucket (std::size_t bucket_size, std::size_t block_size) | |
| Creates the bucket. More... | |
| Bucket (const Bucket &)=delete | |
| Bucket (Bucket &&) noexcept | |
| Bucket & | operator= (const Bucket &)=delete |
| Bucket & | operator= (Bucket &&)=delete |
| ~Bucket () | |
| std::size_t | bucket_size () const noexcept |
| Size of the whole bucket. More... | |
| std::size_t | block_count () const noexcept |
| Number of memory blocks in this bucket. More... | |
| std::size_t | block_size () const noexcept |
| Size of a single block of memory. More... | |
| std::size_t | blocks_free () const noexcept |
| Number of unused blocks. More... | |
| std::size_t | is_empty () const noexcept |
| Whether all blocks are unused. More... | |
| std::size_t | is_full () const noexcept |
| Whether all blocks are being used. More... | |
| std::byte * | memory () const noexcept |
| Pointer to the memory held by this bucket. More... | |
| bool | contains (const void *ptr) const noexcept |
| Whether this bucket contains the given pointer. More... | |
| void * | allocate (std::size_t bytes) noexcept |
| Allocates the given number of bytes. More... | |
| void | deallocate (void *ptr, std::size_t bytes) noexcept |
| Deallocates the given number of bytes. More... | |
Private Attributes | |
| const std::size_t | bucket_size_ |
| const std::size_t | block_count_ |
| const std::size_t | block_size_ |
| std::size_t | blocks_free_ |
| std::byte * | memory_ |
| Strategy | allocator_ |
Friends | |
| bool | operator== (const Bucket &l, const Bucket &r) noexcept |
| Compares two buckets. More... | |
A bucket of memory blocks of the given size.
|
delete |
| mysql_harness::SecureMemoryPool::Bucket< Strategy >::Bucket | ( | std::size_t | bucket_size, |
| std::size_t | block_size | ||
| ) |
Creates the bucket.
| bucket_size | Size of the whole bucket. |
| block_size | Size of a single block of memory. |
|
delete |
|
noexcept |
| mysql_harness::SecureMemoryPool::Bucket< Strategy >::~Bucket | ( | ) |
|
noexcept |
Allocates the given number of bytes.
| bytes | Number of bytes to allocate. |
|
inlinenoexcept |
Number of memory blocks in this bucket.
|
inlinenoexcept |
Size of a single block of memory.
|
inlinenoexcept |
Number of unused blocks.
|
inlinenoexcept |
Size of the whole bucket.
|
noexcept |
Whether this bucket contains the given pointer.
|
noexcept |
Deallocates the given number of bytes.
| ptr | Memory previously allocated by this class. |
| bytes | Size of the memory. |
|
inlinenoexcept |
Whether all blocks are unused.
|
inlinenoexcept |
Whether all blocks are being used.
|
inlinenoexcept |
Pointer to the memory held by this bucket.
|
delete |
|
delete |
|
friend |
Compares two buckets.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |