37 #ifndef _POOLALLOC_INCLUDED_ 38 #define _POOLALLOC_INCLUDED_ 41 # define GUARD_BLOCKS // define to enable guard block sanity checking 110 void checkGuardBlock(
unsigned char* blockMem,
unsigned char val,
const char* locText)
const;
149 TPoolAllocator(
int growthIncrement = 8*1024,
int allocationAlignment = 16);
199 lastAllocation->checkAllocList();
273 template<
class Other>
284 template<
class Other>
288 return reinterpret_cast<pointer>(getAllocator().allocate(
n *
sizeof(
T))); }
290 return reinterpret_cast<pointer>(getAllocator().allocate(
n *
sizeof(
T))); }
296 return reinterpret_cast<pointer>(getAllocator().allocate(
n)); }
317 #endif // _POOLALLOC_INCLUDED_ Definition: PoolAlloc.h:75
pool_allocator & operator=(const pool_allocator &)
Definition: PoolAlloc.h:311
pool_allocator(const pool_allocator< Other > &p)
Definition: PoolAlloc.h:285
GLuint GLfloat * val
Definition: glext.h:7847
unsigned char * preGuard() const
Definition: PoolAlloc.h:113
static const size_t guardBlockSize
Definition: PoolAlloc.h:125
Definition: PoolAlloc.h:274
tHeader * freeList
Definition: PoolAlloc.h:237
Definition: PoolAlloc.h:189
tHeader * nextPage
Definition: PoolAlloc.h:206
void setAllocator(TPoolAllocator *a)
Definition: PoolAlloc.h:307
pointer allocate(size_type n, const void *)
Definition: PoolAlloc.h:289
void checkAllocList() const
Definition: PoolAlloc.cpp:309
void deallocate(pointer, size_type)
Definition: PoolAlloc.h:293
GLsizeiptr size
Definition: glext.h:6559
size_t pageSize
Definition: PoolAlloc.h:229
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
Definition: pixman-arm-neon-asm.h:543
void popAll()
Definition: PoolAlloc.cpp:227
~tHeader()
Definition: PoolAlloc.h:196
unsigned char * data() const
Definition: PoolAlloc.h:114
std::vector< tAllocState > tAllocStack
Definition: PoolAlloc.h:214
size_type max_size() const
Definition: PoolAlloc.h:304
Definition: PoolAlloc.h:264
tHeader * page
Definition: PoolAlloc.h:212
pointer _Charalloc(size_t n)
Definition: PoolAlloc.h:295
static const unsigned char guardBlockBeginVal
Definition: PoolAlloc.h:121
void push()
Definition: PoolAlloc.cpp:176
void pop()
Definition: PoolAlloc.cpp:195
const T * const_pointer
Definition: PoolAlloc.h:269
static const unsigned char guardBlockEndVal
Definition: PoolAlloc.h:122
pool_allocator()
Definition: PoolAlloc.h:280
size_t alignmentMask
Definition: PoolAlloc.h:232
unsigned char * postGuard() const
Definition: PoolAlloc.h:115
pool_allocator(const pool_allocator< T > &p)
Definition: PoolAlloc.h:282
~TPoolAllocator()
Definition: PoolAlloc.cpp:117
TPoolAllocator & GetThreadPoolAllocator()
Definition: PoolAlloc.cpp:47
static const unsigned char userDataFill
Definition: PoolAlloc.h:123
pool_allocator(TPoolAllocator &a)
Definition: PoolAlloc.h:281
int numCalls
Definition: PoolAlloc.h:241
size_t alignment
Definition: PoolAlloc.h:230
TPoolAllocator & getAllocator() const
Definition: PoolAlloc.h:308
size_t size
Definition: PoolAlloc.h:117
ptrdiff_t difference_type
Definition: PoolAlloc.h:267
size_t size_type
Definition: PoolAlloc.h:266
size_t totalBytes
Definition: PoolAlloc.h:242
void * initializeAllocation(tHeader *, unsigned char *memory, size_t)
Definition: PoolAlloc.h:218
size_t offset
Definition: PoolAlloc.h:211
pointer allocate(size_type n)
Definition: PoolAlloc.h:287
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
void check() const
Definition: PoolAlloc.h:91
size_t pageCount
Definition: PoolAlloc.h:207
tHeader(tHeader *nextPage, size_t pageCount)
Definition: PoolAlloc.h:190
void deallocate(void *, size_type)
Definition: PoolAlloc.h:292
GLfloat GLfloat p
Definition: glext.h:9809
size_t headerSkip
Definition: PoolAlloc.h:233
tHeader * inUseList
Definition: PoolAlloc.h:238
static int block
Definition: psp2.c:31
static size_t allocationSize(size_t size)
Definition: PoolAlloc.h:100
void SetThreadPoolAllocator(TPoolAllocator *poolAllocator)
Definition: PoolAlloc.cpp:53
pointer address(reference x) const
Definition: PoolAlloc.h:277
void checkGuardBlock(unsigned char *blockMem, unsigned char val, const char *locText) const
Definition: PoolAlloc.cpp:156
Definition: PoolAlloc.h:147
tAllocStack stack
Definition: PoolAlloc.h:239
TPoolAllocator(int growthIncrement=8 *1024, int allocationAlignment=16)
Definition: PoolAlloc.cpp:72
static unsigned char * offsetAllocation(unsigned char *m)
Definition: PoolAlloc.h:105
TPoolAllocator & operator=(const TPoolAllocator &)
static size_t headerSize()
Definition: PoolAlloc.h:129
T & reference
Definition: PoolAlloc.h:270
TAllocation(size_t size, unsigned char *mem, TAllocation *prev=0)
Definition: PoolAlloc.h:77
size_t currentPageOffset
Definition: PoolAlloc.h:236
bool operator!=(const pool_allocator &rhs) const
Definition: PoolAlloc.h:302
T value_type
Definition: PoolAlloc.h:272
unsigned char * mem
Definition: PoolAlloc.h:118
bool operator==(const pool_allocator &rhs) const
Definition: PoolAlloc.h:301
void * memset(void *b, int c, size_t len)
Definition: string.c:7
TPoolAllocator & allocator
Definition: PoolAlloc.h:312
GLdouble n
Definition: glext.h:8396
const GLfloat * m
Definition: glext.h:11755
const_pointer address(const_reference x) const
Definition: PoolAlloc.h:278
TAllocation * prevAlloc
Definition: PoolAlloc.h:119
const T & const_reference
Definition: PoolAlloc.h:271
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
T * pointer
Definition: PoolAlloc.h:268
void construct(pointer p, const T &val)
Definition: PoolAlloc.h:298
void * allocate(size_t numBytes)
Definition: PoolAlloc.cpp:233
void destroy(pointer p)
Definition: PoolAlloc.h:299
pool_allocator< Other > other
Definition: PoolAlloc.h:275
size_type max_size(int size) const
Definition: PoolAlloc.h:305
Definition: PoolAlloc.h:210