diff options
author | Mukul Sabharwal <muks@microsoft.com> | 2019-02-22 15:56:28 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2019-02-22 15:56:28 -0800 |
commit | 4932d0f6fa87b9a6e3293aacd35cecedde44d87a (patch) | |
tree | 0330e86de295b7d14c8db32478a8aff76147e685 /src/gc/gcee.cpp | |
parent | 6a392d9084a1afe8b9861138e5d0e5b688deca44 (diff) | |
download | coreclr-4932d0f6fa87b9a6e3293aacd35cecedde44d87a.tar.gz coreclr-4932d0f6fa87b9a6e3293aacd35cecedde44d87a.tar.bz2 coreclr-4932d0f6fa87b9a6e3293aacd35cecedde44d87a.zip |
Enable FEATURE_BASICFREEZE (#22776)
Diffstat (limited to 'src/gc/gcee.cpp')
-rw-r--r-- | src/gc/gcee.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gc/gcee.cpp b/src/gc/gcee.cpp index bd5a8f6154..68310d5b6c 100644 --- a/src/gc/gcee.cpp +++ b/src/gc/gcee.cpp @@ -600,6 +600,22 @@ void GCHeap::UnregisterFrozenSegment(segment_handle seg) #endif // FEATURE_BASICFREEZE } +bool GCHeap::IsInFrozenSegment(Object *object) +{ +#ifdef FEATURE_BASICFREEZE + uint8_t* o = (uint8_t*)object; + heap_segment * hs = gc_heap::find_segment (o, FALSE); + //We create a frozen object for each frozen segment before the segment is inserted + //to segment list; during ngen, we could also create frozen objects in segments which + //don't belong to current GC heap. + //So we return true if hs is NULL. It might create a hole about detecting invalidate + //object. But given all other checks present, the hole should be very small + return !hs || heap_segment_read_only_p (hs); +#else // FEATURE_BASICFREEZE + return false; +#endif +} + bool GCHeap::RuntimeStructuresValid() { return GCScan::GetGcRuntimeStructuresValid(); |