Cleanups.
committer: mfx <mfx> 1034741718 +0000
This commit is contained in:
parent
8d37bb4469
commit
cecfaaf63e
@ -68,11 +68,7 @@ unsigned MemBuffer::getSize() const
|
||||
|
||||
void MemBuffer::alloc(unsigned size, unsigned base_offset)
|
||||
{
|
||||
#if 0
|
||||
this->dealloc();
|
||||
#else
|
||||
// don't automaticlly free a used buffer
|
||||
#endif
|
||||
// NOTE: we don't automaticlly free a used buffer
|
||||
assert(alloc_ptr == NULL);
|
||||
assert((int)size > 0);
|
||||
size = base_offset + size;
|
||||
@ -96,12 +92,14 @@ void MemBuffer::alloc(unsigned size)
|
||||
|
||||
void MemBuffer::allocForCompression(unsigned uncompressed_size)
|
||||
{
|
||||
assert((int)uncompressed_size > 0);
|
||||
alloc(uncompressed_size + uncompressed_size/8 + 256, 0);
|
||||
}
|
||||
|
||||
|
||||
void MemBuffer::allocForUncompression(unsigned uncompressed_size)
|
||||
{
|
||||
assert((int)uncompressed_size > 0);
|
||||
//alloc(uncompressed_size + 3 + 512, 0); // 512 safety bytes
|
||||
alloc(uncompressed_size + 3, 0); // 3 bytes for asm_fast decompresion
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user