RecyclableMemoryStreamManager.Events.MemoryStreamDiscardBuffer method

December 6, 2023 · View on GitHub

Logged when a buffer is discarded (not put back in the pool, but given to GC to clean up).

public void MemoryStreamDiscardBuffer(Guid guid, string? tag, MemoryStreamBufferType bufferType, 
    MemoryStreamDiscardReason reason, long smallBlocksFree, long smallPoolBytesFree, 
    long smallPoolBytesInUse, long largeBlocksFree, long largePoolBytesFree, 
    long largePoolBytesInUse)
parameterdescription
guidUnique stream ID.
tagA temporary ID for this stream, usually indicates current usage.
bufferTypeType of the buffer being discarded.
reasonReason for the discard.
smallBlocksFreeNumber of free small pool blocks.
smallPoolBytesFreeBytes free in the small pool.
smallPoolBytesInUseBytes in use from the small pool.
largeBlocksFreeNumber of free large pool blocks.
largePoolBytesFreeBytes free in the large pool.
largePoolBytesInUseBytes in use from the large pool.

See Also