diff options
author | Fadi Hanna <fadim@microsoft.com> | 2016-11-15 22:27:43 +0300 |
---|---|---|
committer | Fadi Hanna <fadim@microsoft.com> | 2016-11-15 22:27:43 +0300 |
commit | 4e29f019e860dfcf8ddfee9b47376f76e51af2ae (patch) | |
tree | 72df3fbd434fe317f65f4f33c23b6c048a226d65 /src/Native/Runtime/PalRedhawk.h | |
parent | 691756f86e4def5c8ca13acd3e0c17011d436857 (diff) |
Thunk pool implementation for CoreRT. In CoreRT, the thunk mappings are allocated dynamically in memory using VirtualAlloc. The thunk stubs pages are marked with RX permissions and the thunks data pages are marked with RW permissions.
Refactored some code in ThunkPool.cs to remove from it any knowledge about the thunk sections layout. Thunks layout and allocation become a black box to ThunkPool.cs. All the section layout information is moved to the native component, and section navigation is done by calls to some APIs.
The dynamically allocated thunks pages are enabled by a FEATURE_RX_THUNKS, and only in CoreRT's Full build for now. The portable build doesn't yet support thunks.
[tfs-changeset: 1638131]
Diffstat (limited to 'src/Native/Runtime/PalRedhawk.h')
-rw-r--r-- | src/Native/Runtime/PalRedhawk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Native/Runtime/PalRedhawk.h b/src/Native/Runtime/PalRedhawk.h index cb454fc2c..028d555ac 100644 --- a/src/Native/Runtime/PalRedhawk.h +++ b/src/Native/Runtime/PalRedhawk.h @@ -792,6 +792,7 @@ EXTERN_C void * __cdecl _alloca(size_t); REDHAWK_PALIMPORT _Ret_maybenull_ _Post_writable_byte_size_(size) void* REDHAWK_PALAPI PalVirtualAlloc(_In_opt_ void* pAddress, UIntNative size, UInt32 allocationType, UInt32 protect); REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualFree(_In_ void* pAddress, UIntNative size, UInt32 freeType); +REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalVirtualProtect(_In_ void* pAddress, UIntNative size, UInt32 protect); REDHAWK_PALIMPORT void REDHAWK_PALAPI PalSleep(UInt32 milliseconds); REDHAWK_PALIMPORT UInt32_BOOL REDHAWK_PALAPI PalSwitchToThread(); REDHAWK_PALIMPORT HANDLE REDHAWK_PALAPI PalCreateEventW(_In_opt_ LPSECURITY_ATTRIBUTES pEventAttributes, UInt32_BOOL manualReset, UInt32_BOOL initialState, _In_opt_z_ LPCWSTR pName); |