remove the raise_exeception member variable from the memory manager.

changed the allocate(), reallocate(), callocate() to accept raise_exception instead.
touched up HashTable a bit
This commit is contained in:
2015-02-17 04:45:20 +00:00
parent 0a5ee4de4d
commit 8c15d39d9a
11 changed files with 161 additions and 149 deletions

View File

@ -36,8 +36,8 @@ struct xma_xtn_t
HeapMmgr* heap;
};
HeapMmgr::HeapMmgr (Mmgr* mmgr, qse_size_t heap_size, bool raise_exception):
Mmgr(raise_exception), Mmged(mmgr), xma(QSE_NULL), heap_size (heap_size)
HeapMmgr::HeapMmgr (Mmgr* mmgr, qse_size_t heap_size):
Mmgr(), Mmged(mmgr), xma(QSE_NULL), heap_size (heap_size)
{
}

View File

@ -47,9 +47,9 @@ void Mmgr::free_mem (mmgr_t* mmgr, void* ptr)
((Mmgr*)mmgr->ctx)->freeMem (ptr);
}
void* Mmgr::callocate (qse_size_t n)
void* Mmgr::callocate (qse_size_t n, bool raise_exception)
{
void* ptr = this->allocate (n);
void* ptr = this->allocate (n, raise_exception);
QSE_MEMSET (ptr, 0, n);
return ptr;
}