use mmap to allocate memory for generated code to be able to set PROT_EXEC

This commit is contained in:
Ludwig Nussel 2006-03-04 11:14:44 +00:00
parent 87ce505868
commit 39f2e449b6
3 changed files with 49 additions and 50 deletions

View file

@ -615,6 +615,9 @@ VM_Free
*/
void VM_Free( vm_t *vm ) {
if(vm->destroy)
vm->destroy(vm);
if ( vm->dllHandle ) {
Sys_UnloadDll( vm->dllHandle );
Com_Memset( vm, 0, sizeof( *vm ) );