diff options
author | Steve MacLean <sdmaclea.qdt@qualcommdatacenter.com> | 2017-06-12 17:14:12 -0400 |
---|---|---|
committer | Maoni Stephens <Maoni0@users.noreply.github.com> | 2017-06-12 14:14:12 -0700 |
commit | 0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5 (patch) | |
tree | 8f099e2391d8990de1c7d0f4ca4c3fcae6839e4d /src/vm/virtualcallstub.cpp | |
parent | c655981474be1d3aa0165408e5c3914c5cfc35a1 (diff) | |
download | coreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.tar.gz coreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.tar.bz2 coreclr-0ee3b5e64a98dc71aefed2304fe4bcf7f66ca9f5.zip |
[Arm64/Unix] Add 64K page support (#10981)
* [Arm64/Unix] Support 64K pages
* GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
Diffstat (limited to 'src/vm/virtualcallstub.cpp')
-rw-r--r-- | src/vm/virtualcallstub.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/vm/virtualcallstub.cpp b/src/vm/virtualcallstub.cpp index e753860fd1..c230f254c6 100644 --- a/src/vm/virtualcallstub.cpp +++ b/src/vm/virtualcallstub.cpp @@ -592,20 +592,20 @@ void VirtualCallStubManager::Init(BaseDomain *pDomain, LoaderAllocator *pLoaderA // // Align up all of the commit and reserve sizes // - indcell_heap_reserve_size = (DWORD) ALIGN_UP(indcell_heap_reserve_size, PAGE_SIZE); - indcell_heap_commit_size = (DWORD) ALIGN_UP(indcell_heap_commit_size, PAGE_SIZE); + indcell_heap_reserve_size = (DWORD) ALIGN_UP(indcell_heap_reserve_size, GetOsPageSize()); + indcell_heap_commit_size = (DWORD) ALIGN_UP(indcell_heap_commit_size, GetOsPageSize()); - cache_entry_heap_reserve_size = (DWORD) ALIGN_UP(cache_entry_heap_reserve_size, PAGE_SIZE); - cache_entry_heap_commit_size = (DWORD) ALIGN_UP(cache_entry_heap_commit_size, PAGE_SIZE); + cache_entry_heap_reserve_size = (DWORD) ALIGN_UP(cache_entry_heap_reserve_size, GetOsPageSize()); + cache_entry_heap_commit_size = (DWORD) ALIGN_UP(cache_entry_heap_commit_size, GetOsPageSize()); - lookup_heap_reserve_size = (DWORD) ALIGN_UP(lookup_heap_reserve_size, PAGE_SIZE); - lookup_heap_commit_size = (DWORD) ALIGN_UP(lookup_heap_commit_size, PAGE_SIZE); + lookup_heap_reserve_size = (DWORD) ALIGN_UP(lookup_heap_reserve_size, GetOsPageSize()); + lookup_heap_commit_size = (DWORD) ALIGN_UP(lookup_heap_commit_size, GetOsPageSize()); - dispatch_heap_reserve_size = (DWORD) ALIGN_UP(dispatch_heap_reserve_size, PAGE_SIZE); - dispatch_heap_commit_size = (DWORD) ALIGN_UP(dispatch_heap_commit_size, PAGE_SIZE); + dispatch_heap_reserve_size = (DWORD) ALIGN_UP(dispatch_heap_reserve_size, GetOsPageSize()); + dispatch_heap_commit_size = (DWORD) ALIGN_UP(dispatch_heap_commit_size, GetOsPageSize()); - resolve_heap_reserve_size = (DWORD) ALIGN_UP(resolve_heap_reserve_size, PAGE_SIZE); - resolve_heap_commit_size = (DWORD) ALIGN_UP(resolve_heap_commit_size, PAGE_SIZE); + resolve_heap_reserve_size = (DWORD) ALIGN_UP(resolve_heap_reserve_size, GetOsPageSize()); + resolve_heap_commit_size = (DWORD) ALIGN_UP(resolve_heap_commit_size, GetOsPageSize()); BYTE * initReservedMem = NULL; @@ -624,16 +624,16 @@ void VirtualCallStubManager::Init(BaseDomain *pDomain, LoaderAllocator *pLoaderA DWORD dwWastedReserveMemSize = dwTotalReserveMemSize - dwTotalReserveMemSizeCalc; if (dwWastedReserveMemSize != 0) { - DWORD cWastedPages = dwWastedReserveMemSize / PAGE_SIZE; + DWORD cWastedPages = dwWastedReserveMemSize / GetOsPageSize(); DWORD cPagesPerHeap = cWastedPages / 5; DWORD cPagesRemainder = cWastedPages % 5; // We'll throw this at the resolve heap - indcell_heap_reserve_size += cPagesPerHeap * PAGE_SIZE; - cache_entry_heap_reserve_size += cPagesPerHeap * PAGE_SIZE; - lookup_heap_reserve_size += cPagesPerHeap * PAGE_SIZE; - dispatch_heap_reserve_size += cPagesPerHeap * PAGE_SIZE; - resolve_heap_reserve_size += cPagesPerHeap * PAGE_SIZE; - resolve_heap_reserve_size += cPagesRemainder * PAGE_SIZE; + indcell_heap_reserve_size += cPagesPerHeap * GetOsPageSize(); + cache_entry_heap_reserve_size += cPagesPerHeap * GetOsPageSize(); + lookup_heap_reserve_size += cPagesPerHeap * GetOsPageSize(); + dispatch_heap_reserve_size += cPagesPerHeap * GetOsPageSize(); + resolve_heap_reserve_size += cPagesPerHeap * GetOsPageSize(); + resolve_heap_reserve_size += cPagesRemainder * GetOsPageSize(); } CONSISTENCY_CHECK((indcell_heap_reserve_size + @@ -653,20 +653,20 @@ void VirtualCallStubManager::Init(BaseDomain *pDomain, LoaderAllocator *pLoaderA } else { - indcell_heap_reserve_size = PAGE_SIZE; - indcell_heap_commit_size = PAGE_SIZE; + indcell_heap_reserve_size = GetOsPageSize(); + indcell_heap_commit_size = GetOsPageSize(); - cache_entry_heap_reserve_size = PAGE_SIZE; - cache_entry_heap_commit_size = PAGE_SIZE; + cache_entry_heap_reserve_size = GetOsPageSize(); + cache_entry_heap_commit_size = GetOsPageSize(); - lookup_heap_reserve_size = PAGE_SIZE; - lookup_heap_commit_size = PAGE_SIZE; + lookup_heap_reserve_size = GetOsPageSize(); + lookup_heap_commit_size = GetOsPageSize(); - dispatch_heap_reserve_size = PAGE_SIZE; - dispatch_heap_commit_size = PAGE_SIZE; + dispatch_heap_reserve_size = GetOsPageSize(); + dispatch_heap_commit_size = GetOsPageSize(); - resolve_heap_reserve_size = PAGE_SIZE; - resolve_heap_commit_size = PAGE_SIZE; + resolve_heap_reserve_size = GetOsPageSize(); + resolve_heap_commit_size = GetOsPageSize(); #ifdef _DEBUG DWORD dwTotalReserveMemSizeCalc = indcell_heap_reserve_size + |