예제 #1
0
KEXPORT void UnhookAfsReplace()
{
	MasterUnhookFunction(code[C_NEWFILEFROMAFS_CS], afsNewFileFromAFS);
	MasterUnhookFunction(code[C_ALLOCATEBUFFERS_CS], afsAllocateBuffers);
	
	// free all file buffers
	for (g_FilesIterator = g_Files.begin(); g_FilesIterator != g_Files.end();
				g_FilesIterator++) {
		try {
			LogWithNumber(&k_kload, "Buffer with %d bytes was still allocated!", 
										(g_FilesIterator->second)->replaceSize);
			makeReplaceBuffer(0, g_FilesIterator->second);
			HeapFree(GetProcessHeap(),0,(void*)g_FilesIterator->second);
		} catch (...) {}
	}
	g_Files.clear();
	
	DeleteCriticalSection(&_ar_cs);
	return;
}
예제 #2
0
Expr Expr::substitute(const std::hash_map<Expr, Expr, ExprHashFunction> map) const {
  ExprManagerScope ems(*this);
  return Expr(d_exprManager, new Node(d_node->substitute(mkNodePairIteratorAdaptor(map.begin()), mkNodePairIteratorAdaptor(map.end()))));
}