Skip to content

Commit

Permalink
Do not release frozen segment if we failed extending it (#94450)
Browse files Browse the repository at this point in the history
Maybe I'm missing something, but if we try to commit more of the reserved segment and this fails, it doesn't feel right to release the whole thing. The previously committed part of the segment is still in use.
  • Loading branch information
MichalStrehovsky committed Nov 7, 2023
1 parent b0e1627 commit 021ecb8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/coreclr/vm/frozenobjectheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ Object* FrozenObjectSegment::TryAllocateObject(PTR_MethodTable type, size_t obje

if (ClrVirtualAlloc(m_pStart + m_SizeCommitted, FOH_COMMIT_SIZE, MEM_COMMIT, PAGE_READWRITE) == nullptr)
{
ClrVirtualFree(m_pStart, 0, MEM_RELEASE);
ThrowOutOfMemory();
}
m_SizeCommitted += FOH_COMMIT_SIZE;
Expand Down

0 comments on commit 021ecb8

Please sign in to comment.