internal TypeDescriptionEntries(MemorySnapshotFileReader reader) { flags = new ArrayEntries <TypeFlags>(reader, EntryType.TypeDescriptions_Flags, ConversionFunctions.ToTypeFlags); typeDescriptionName = new ArrayEntries <string>(reader, EntryType.TypeDescriptions_Name, ConversionFunctions.ToString); assembly = new ArrayEntries <string>(reader, EntryType.TypeDescriptions_Assembly, ConversionFunctions.ToString); fieldIndices = new ArrayEntries <int[]>(reader, EntryType.TypeDescriptions_FieldIndices, ConversionFunctions.ToInt32Array); staticFieldBytes = new ByteArrayEntries(reader, EntryType.TypeDescriptions_StaticFieldBytes); baseOrElementTypeIndex = new ArrayEntries <int>(reader, EntryType.TypeDescriptions_BaseOrElementTypeIndex, ConversionFunctions.ToInt32); size = new ArrayEntries <int>(reader, EntryType.TypeDescriptions_Size, ConversionFunctions.ToInt32); typeInfoAddress = new ArrayEntries <ulong>(reader, EntryType.TypeDescriptions_TypeInfoAddress, ConversionFunctions.ToUInt64); typeIndex = new ArrayEntries <int>(reader, EntryType.TypeDescriptions_TypeIndex, ConversionFunctions.ToInt32); }
internal ManagedMemorySectionEntries(MemorySnapshotFileReader reader, EntryType entryTypeBase, bool hasHeapTypeEncodedInAddr) { //all addresses store the heap type in their highest bit (ver 12+) //only the new reader inside com.unity.memoryprofiler will read the encodings GetItem <ulong> func; if (hasHeapTypeEncodedInAddr) { func = ConversionFunctions.ToUInt64WithMask; } else { func = ConversionFunctions.ToUInt64; } startAddress = new ArrayEntries <ulong>(reader, (EntryType)(entryTypeBase + 0), func); bytes = new ByteArrayEntries(reader, (EntryType)(entryTypeBase + 1)); }
internal ManagedMemorySectionEntries(MemorySnapshotFileReader reader, EntryType entryTypeBase) { startAddress = new ArrayEntries <ulong>(reader, (EntryType)(entryTypeBase + 0), ConversionFunctions.ToUInt64); bytes = new ByteArrayEntries(reader, (EntryType)(entryTypeBase + 1)); }