#include <other.h>
|
enum | { slice = 1024*1024
} |
|
Definition at line 253 of file other.h.
size_t pfc::bigmem::_sliceCount |
( |
| ) |
|
|
inline |
Definition at line 306 of file other.h.
array_t< uint8_t * > m_data
uint8_t* pfc::bigmem::_slicePtr |
( |
size_t |
which | ) |
|
|
inline |
Definition at line 305 of file other.h.
array_t< uint8_t * > m_data
size_t pfc::bigmem::_sliceSize |
( |
size_t |
which | ) |
|
|
inline |
void pfc::bigmem::clear |
( |
| ) |
|
|
inline |
Definition at line 276 of file other.h.
array_t< uint8_t * > m_data
void set_size(t_size p_size)
void pfc::bigmem::read |
( |
void * |
ptrOut, |
|
|
size_t |
bytes, |
|
|
size_t |
offset |
|
) |
| |
|
inline |
Definition at line 281 of file other.h.
282 PFC_ASSERT( offset + bytes <=
size() );
283 uint8_t * outWalk = (uint8_t*) ptrOut;
285 size_t o1 = offset /
slice, o2 = offset %
slice;
286 size_t delta =
slice - o2;
if (delta > bytes) delta = bytes;
287 memcpy(outWalk,
m_data[o1] + o2, delta);
array_t< uint8_t * > m_data
void pfc::bigmem::resize |
( |
size_t |
newSize | ) |
|
|
inline |
Definition at line 259 of file other.h.
264 size_t thisSlice =
slice;
266 size_t cut = newSize %
slice;
267 if (cut) thisSlice = cut;
269 void* ptr = malloc(thisSlice);
270 if (ptr == NULL) {
clear();
throw std::bad_alloc();}
271 m_data[walk] = (uint8_t*)ptr;
array_t< uint8_t * > m_data
void set_size(t_size p_size)
size_t pfc::bigmem::size |
( |
| ) |
const |
|
inline |
void pfc::bigmem::write |
( |
const void * |
ptrIn, |
|
|
size_t |
bytes, |
|
|
size_t |
offset |
|
) |
| |
|
inline |
Definition at line 293 of file other.h.
294 PFC_ASSERT( offset + bytes <=
size() );
295 const uint8_t * inWalk = (
const uint8_t*) ptrIn;
297 size_t o1 = offset /
slice, o2 = offset %
slice;
298 size_t delta =
slice - o2;
if (delta > bytes) delta = bytes;
299 memcpy(
m_data[o1] + o2, inWalk, delta);
array_t< uint8_t * > m_data
array_t<uint8_t*> pfc::bigmem::m_data |
|
private |
size_t pfc::bigmem::m_size |
|
private |
The documentation for this class was generated from the following file: