Skip to content

Avoid pinning OverlappedData objects #74212

@preetamshetty1

Description

@preetamshetty1

NativeOverlapped moved the data to native memory. The code below creates an AsyncPinned handle for the object and consequently the userData. Can we consider avoiding the pinning here? Or move these to the POH?

The handle right now does contribute to fragmentation. Especially for cases where there may be long running connections etc. which may promote these to GEN2.

overlappedHolder->m_handle = GetAppDomain()->CreateTypedHandle(overlapped, HNDTYPE_ASYNCPINNED);

HandleTable:
0000023FD9E5A950 (async pinned handle)
-> 0000023FB8978590 System.Threading.OverlappedData

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions