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
2 changes: 1 addition & 1 deletion src/coreclr/src/System.Private.CoreLib/src/System/GC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public static long GetTotalMemory(bool forceFullCollection)
}

[DllImport(RuntimeHelpers.QCall, CharSet = CharSet.Unicode)]
private static extern IntPtr _RegisterFrozenSegment(IntPtr sectionAddress, IntPtr sectionSize);
private static extern IntPtr _RegisterFrozenSegment(IntPtr sectionAddress, nint sectionSize);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unmanaged size is using unsigned type for this, but fixing that would require changes in the code that looks up this API via private reflection.

Copy link
Member Author

@eerhardt eerhardt May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right - the unmanaged code is using SIZE_T.

/*===============================RegisterFrozenSegment===============================
**Action: Registers the frozen segment
**Returns: segment_handle
**Arguments: args-> pointer to section, size of section
**Exceptions: None
==============================================================================*/
void* QCALLTYPE GCInterface::RegisterFrozenSegment(void* pSection, SIZE_T sizeSection)

I didn't want to actually change the managed type. Unless @mjsabby was OK with it. I assume that is the only user of this experimental feature, or are there others?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I merged this -- perhaps there was an open question here?


[DllImport(RuntimeHelpers.QCall, CharSet = CharSet.Unicode)]
private static extern void _UnregisterFrozenSegment(IntPtr segmentHandle);
Expand Down