projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d939a2d
)
Optimize reset_memory to only kick in for low memory situations. (#37894)
author
Peter Sollich
<petersol@microsoft.com>
Thu, 18 Jun 2020 12:29:19 +0000
(14:29 +0200)
committer
GitHub
<noreply@github.com>
Thu, 18 Jun 2020 12:29:19 +0000
(14:29 +0200)
This will save time both in VirtualReset and later in page faults.
src/coreclr/src/gc/gc.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/gc/gc.cpp
b/src/coreclr/src/gc/gc.cpp
index
c7f0489
..
849776e
100644
(file)
--- a/
src/coreclr/src/gc/gc.cpp
+++ b/
src/coreclr/src/gc/gc.cpp
@@
-32577,7
+32577,7
@@
void reset_memory (uint8_t* o, size_t sizeo)
size_t size = align_lower_page ((size_t)o + sizeo - size_to_skip - plug_skew) - page_start;
// Note we need to compensate for an OS bug here. This bug would cause the MEM_RESET to fail
// on write watched memory.
- if (reset_mm_p)
+ if (reset_mm_p
&& gc_heap::g_low_memory_status
)
{
#ifdef MULTIPLE_HEAPS
bool unlock_p = true;