Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Revert "Fixed SzArray from Collectible LoaderAllocator being allocate…
…d in frozen heap"

This reverts commit 9c7cc33.
  • Loading branch information
alexey-zakharov committed Apr 2, 2024
commit abb2b03f36681234340b8797a6d153102198a066
1 change: 0 additions & 1 deletion src/coreclr/vm/frozenobjectheap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Object* FrozenObjectHeapManager::TryAllocateObject(PTR_MethodTable type, size_t
CrstHolder ch(&m_Crst);

_ASSERT(type != nullptr);
_ASSERT(!type->Collectible());
_ASSERT(FOH_COMMIT_SIZE >= MIN_OBJECT_SIZE);

// Currently we don't support frozen objects with special alignment requirements
Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/vm/gchelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,9 @@ OBJECTREF TryAllocateFrozenSzArray(MethodTable* pArrayMT, INT32 cElements)

CorElementType elemType = pArrayMT->GetArrayElementType();

if (pArrayMT->Collectible() || (pArrayMT->ContainsPointers() && cElements > 0))
if (pArrayMT->ContainsPointers() && cElements > 0)
{
// We cannot allocate in the frozen heap if:
// - the array type is collectible
// - or for non empty arrays with GC pointers
// For arrays with GC pointers we can only work with empty arrays
return NULL;
}

Expand Down