Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal unsafe partial class FrozenObjectHeapManager
{
public static readonly FrozenObjectHeapManager Instance = new FrozenObjectHeapManager();

private readonly LowLevelLock m_Crst = new LowLevelLock();
private readonly Lock m_Crst = new Lock();
private FrozenObjectSegment m_CurrentSegment;

// Default size to reserve for a frozen segment
Expand All @@ -34,9 +34,7 @@ internal unsafe partial class FrozenObjectHeapManager
{
HalfBakedObject* obj = null;

m_Crst.Acquire();

try
using (m_Crst.EnterScope())
{
Debug.Assert(type != null);
// _ASSERT(FOH_COMMIT_SIZE >= MIN_OBJECT_SIZE);
Expand Down Expand Up @@ -84,10 +82,6 @@ internal unsafe partial class FrozenObjectHeapManager
Debug.Assert(obj != null);
}
} // end of m_Crst lock
finally
{
m_Crst.Release();
}

IntPtr result = (IntPtr)obj;

Expand Down