Added ASM code patching when loading
For CNv2 variants with different iterations and memory size.
This commit is contained in:
parent
492449e9fb
commit
8b9d5cff91
19 changed files with 118 additions and 2034 deletions
|
@ -182,3 +182,15 @@ void Mem::release(MemInfo &info)
|
|||
_mm_free(info.memory);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void* Mem::allocate_executable_memory(size_t size)
|
||||
{
|
||||
return VirtualAlloc(0, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||
}
|
||||
|
||||
|
||||
void Mem::FlushInstructionCache(void* p, size_t size)
|
||||
{
|
||||
::FlushInstructionCache(GetCurrentProcess(), p, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue