Optimize dynamic memory allocations for managed runtime interop collections with a new Arena Allocation
This commit is contained in:
@@ -1539,7 +1539,7 @@ MObject* MClass::GetAttribute(const MClass* klass) const
|
||||
return attrInfo ? mono_custom_attrs_get_attr(attrInfo, klass->GetNative()) : nullptr;
|
||||
}
|
||||
|
||||
const Array<MObject*>& MClass::GetAttributes() const
|
||||
const Array<MObject*, ArenaAllocation>& MClass::GetAttributes() const
|
||||
{
|
||||
if (_hasCachedAttributes)
|
||||
return _attributes;
|
||||
@@ -1662,7 +1662,7 @@ MObject* MEvent::GetAttribute(const MClass* klass) const
|
||||
return foundAttr;
|
||||
}
|
||||
|
||||
const Array<MObject*>& MEvent::GetAttributes() const
|
||||
const Array<MObject*, ArenaAllocation>& MEvent::GetAttributes() const
|
||||
{
|
||||
if (_hasCachedAttributes)
|
||||
return _attributes;
|
||||
@@ -1815,7 +1815,7 @@ MObject* MField::GetAttribute(const MClass* klass) const
|
||||
return foundAttr;
|
||||
}
|
||||
|
||||
const Array<MObject*>& MField::GetAttributes() const
|
||||
const Array<MObject*, ArenaAllocation>& MField::GetAttributes() const
|
||||
{
|
||||
if (_hasCachedAttributes)
|
||||
return _attributes;
|
||||
@@ -1988,7 +1988,7 @@ MObject* MMethod::GetAttribute(const MClass* klass) const
|
||||
return foundAttr;
|
||||
}
|
||||
|
||||
const Array<MObject*>& MMethod::GetAttributes() const
|
||||
const Array<MObject*, ArenaAllocation>& MMethod::GetAttributes() const
|
||||
{
|
||||
if (_hasCachedAttributes)
|
||||
return _attributes;
|
||||
@@ -2118,7 +2118,7 @@ MObject* MProperty::GetAttribute(const MClass* klass) const
|
||||
return foundAttr;
|
||||
}
|
||||
|
||||
const Array<MObject*>& MProperty::GetAttributes() const
|
||||
const Array<MObject*, ArenaAllocation>& MProperty::GetAttributes() const
|
||||
{
|
||||
if (_hasCachedAttributes)
|
||||
return _attributes;
|
||||
|
||||
Reference in New Issue
Block a user