예제 #1
0
	void Insert(const void* p,const size_t sz,const char* msg,const char* file,const int line)
	{
		if (m_mem.find(p)!=m_mem.end()) ERROR("pointer already in debug memory map");
		m_mem[p]=make_pair(sz,string(file) + ":" + tostring(line) + ": " + string(msg));
		m_accumulated += sz;
		++m_calls;
	}
예제 #2
0
	void Remove(const void* p)
	{
		t_map::iterator itt=m_mem.find(p);
		if (itt==m_mem.end()) ERROR("pointer not found in debug memory map");
		m_mem.erase(itt);
	}