added Mmgr::callocate()

fixed various problems in HashTable
This commit is contained in:
2015-02-05 15:51:50 +00:00
parent 6e92bb2985
commit 6da46ff4e1
4 changed files with 173 additions and 83 deletions

View File

@ -26,6 +26,7 @@
#include <qse/cmn/Mmgr.hpp>
#include <qse/cmn/StdMmgr.hpp>
#include "mem.h"
/////////////////////////////////
QSE_BEGIN_NAMESPACE(QSE)
@ -46,6 +47,13 @@ void Mmgr::free_mem (mmgr_t* mmgr, void* ptr)
((Mmgr*)mmgr->ctx)->freeMem (ptr);
}
void* Mmgr::callocate (qse_size_t n)
{
void* ptr = this->allocate (n);
QSE_MEMSET (ptr, 0, n);
return ptr;
}
Mmgr* Mmgr::dfl_mmgr = StdMmgr::getInstance();
Mmgr* Mmgr::getDFL ()