#include <memoryblobs.hh>
|
| using | Ptr = std::shared_ptr< Blob > |
| |
◆ Ptr
◆ State
| Enumerator |
|---|
| UNINITIALIZED | |
| CLEAN | |
| DIRTY | |
| COMPRESSING | |
81 {
86 };
@ DIRTY
Definition memoryblobs.hh:84
@ COMPRESSING
Definition memoryblobs.hh:85
@ CLEAN
Definition memoryblobs.hh:83
@ UNINITIALIZED
Definition memoryblobs.hh:82
◆ Blob()
77
78 {
79 }
std::shared_ptr< ThreadPool > cpuBound
Definition memoryblobs.hh:108
PageProvider::Ptr provider
Definition memoryblobs.hh:101
size_t size
Definition memoryblobs.hh:102
ThreadPool::Ptr CpuBound()
Definition threadpoolimpl.cc:455
◆ compress()
| void Scroom::MemoryBlobs::Blob::compress |
( |
| ) |
|
|
private |
137 {
138 boost::mutex::scoped_lock
const lock(
mut);
140 {
142
146
148 }
149 }
#define require(expr)
Definition assertions.hh:30
uint8_t * data
Definition memoryblobs.hh:103
PageList pages
Definition memoryblobs.hh:107
State state
Definition memoryblobs.hh:104
int refcount
Definition memoryblobs.hh:109
boost::mutex mut
Definition memoryblobs.hh:105
PageList compressBlob(const uint8_t *in, size_t size, const PageProvider::Ptr &provider)
Definition blob-compression.cc:31
◆ create()
std::shared_ptr< Blob > Ptr
Definition memoryblobs.hh:77
Blob(PageProvider::Ptr provider, size_t size)
Definition memoryblobs.cc:73
Referenced by for().
◆ get()
152 {
153 boost::mutex::scoped_lock
const lock(
mut);
157 }
RawPageData::Ptr load()
Definition memoryblobs.cc:81
std::shared_ptr< uint8_t > Ptr
Definition blockallocator.hh:21
SampleIterator< const uint8_t > result
Definition sampleiterator-tests.cc:94
◆ getConst()
169 {
170 boost::mutex::scoped_lock
const lock(
mut);
172 }
◆ initialize()
160 {
161 boost::mutex::scoped_lock
const lock(
mut);
166 }
memset(expected, value, blobSize)
const uint8_t value
Definition blob-tests.cc:114
◆ load()
82 {
85 {
87 {
89
90 data =
static_cast<uint8_t*
>(malloc(
size *
sizeof(uint8_t)));
91 break;
93
94 data =
static_cast<uint8_t*
>(malloc(
size *
sizeof(uint8_t)));
96 break;
98 break;
100
102 break;
103 default:
105 break;
106 }
107
108
112 }
113
115 }
#define defect_message(m)
Definition assertions.hh:49
friend class UnloadData
Definition memoryblobs.hh:98
RawPageData::WeakPtr weakData
Definition memoryblobs.hh:106
void decompressBlob(uint8_t *out, size_t size, PageList list, const PageProvider::Ptr &provider)
Definition blob-compression.cc:71
std::shared_ptr< uint8_t > Ptr
Definition memoryblobs.hh:26
Referenced by get(), getConst(), and initialize().
◆ unload()
| void Scroom::MemoryBlobs::Blob::unload |
( |
| ) |
|
|
private |
118 {
119 boost::mutex::scoped_lock
const lock(
mut);
122 {
124 {
127 }
128 else
129 {
132 }
133 }
134 }
#define COMPRESS_PRIO
Definition memoryblobs.cc:26
◆ UnloadData
◆ cpuBound
| std::shared_ptr<ThreadPool> Scroom::MemoryBlobs::Blob::cpuBound |
|
private |
◆ data
| uint8_t* Scroom::MemoryBlobs::Blob::data {nullptr} |
|
private |
◆ mut
| boost::mutex Scroom::MemoryBlobs::Blob::mut |
|
private |
◆ pages
| PageList Scroom::MemoryBlobs::Blob::pages |
|
private |
◆ provider
◆ refcount
| int Scroom::MemoryBlobs::Blob::refcount {0} |
|
private |
◆ size
| size_t Scroom::MemoryBlobs::Blob::size |
|
private |
◆ state
◆ weakData
The documentation for this class was generated from the following files: