|
|
1.1 ! root 1: /* ! 2: * Multi-platform virtual memory functions for UAE. ! 3: * Copyright (C) 2015 Frode Solheim ! 4: * ! 5: * Licensed under the terms of the GNU General Public License version 2. ! 6: * See the file 'COPYING' for full license text. ! 7: */ ! 8: ! 9: #ifndef UAE_VM_H ! 10: #define UAE_VM_H ! 11: ! 12: #include "uae/types.h" ! 13: ! 14: #define UAE_VM_WRITE 2 ! 15: #define UAE_VM_EXECUTE 4 ! 16: ! 17: #define UAE_VM_32BIT (1 << 8) ! 18: #define UAE_VM_WRITE_WATCH (1 << 9) ! 19: #define UAE_VM_ALLOC_FAILED NULL ! 20: ! 21: /* Even though it looks like you can OR together vm protection values, ! 22: * do not do this. Not all combinations are supported (on Windows), and only ! 23: * a few combinations are implemented. Only use the following predefined ! 24: * constants to be safe. */ ! 25: ! 26: #define UAE_VM_NO_ACCESS 0 ! 27: #define UAE_VM_READ 1 ! 28: #define UAE_VM_READ_WRITE (UAE_VM_READ | UAE_VM_WRITE) ! 29: #define UAE_VM_READ_EXECUTE (UAE_VM_READ | UAE_VM_EXECUTE) ! 30: #define UAE_VM_READ_WRITE_EXECUTE (UAE_VM_READ | UAE_VM_WRITE | UAE_VM_EXECUTE) ! 31: ! 32: #if 0 ! 33: void *uae_vm_alloc(uae_u32 size); ! 34: void *uae_vm_alloc(uae_u32 size, int flags); ! 35: #endif ! 36: void *uae_vm_alloc(uae_u32 size, int flags, int protect); ! 37: bool uae_vm_protect(void *address, int size, int protect); ! 38: bool uae_vm_free(void *address, int size); ! 39: ! 40: void *uae_vm_reserve(uae_u32 size, int flags); ! 41: void *uae_vm_reserve_fixed(void *address, uae_u32 size, int flags); ! 42: void *uae_vm_commit(void *address, uae_u32 size, int protect); ! 43: bool uae_vm_decommit(void *address, uae_u32 size); ! 44: ! 45: int uae_vm_page_size(void); ! 46: ! 47: // void *uae_vm_alloc_with_flags(uae_u32 size, int protect, int flags); ! 48: ! 49: #endif /* UAE_VM_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.