Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions
Enumerates the types.
The type of interface being described: either an , Unix domain socket path, or a file descriptor.
The to bind to.
Only set if is .
The absolute path to a Unix domain socket to bind to.
Only set if is .
A file descriptor for the socket to open.
Only set if is .
The type of file descriptor being used.
Only set if is .
Set to false to enable Nagle's algorithm for all connections.
Enumerates the types.
Used to allocate and distribute re-usable blocks of memory.
This default value passed in to Rent to use the default value for the pool.
Block tracking object used by the byte buffer memory pool. A slab is a large allocation which is divided into smaller blocks. The
individual blocks are then treated as independent array segments.
Back-reference to the memory pool which this block was allocated from. It may only be returned to this pool.
This object cannot be instantiated outside of the static Create method
Block tracking object used by the byte buffer memory pool. A slab is a large allocation which is divided into smaller blocks. The
individual blocks are then treated as independent array segments.
This object cannot be instantiated outside of the static Create method
Back-reference to the memory pool which this block was allocated from. It may only be returned to this pool.
Back-reference to the slab from which this block was taken, or null if it is one-time-use memory.
Slab tracking object used by the byte buffer memory pool. A slab is a large allocation which is divided into smaller blocks. The
individual blocks are then treated as independent array segments.
This handle pins the managed array in memory until the slab is disposed. This prevents it from being
relocated and enables any subsections of the array to be used as native memory pointers to P/Invoked API calls.
True as long as the blocks from this slab are to be considered returnable to the pool. In order to shrink the
memory pool size an entire slab must be removed. That is done by (1) setting IsActive to false and removing the
slab from the pool's _slabs collection, (2) as each block currently in use is Return()ed to the pool it will
be allowed to be garbage collected rather than re-pooled, and (3) when all block tracking objects are garbage
collected and the slab is no longer references the slab will be garbage collected and the memory unpinned will
be unpinned by the slab's Dispose.
Used to allocate and distribute re-usable blocks of memory.
The size of a block. 4096 is chosen because most operating systems use 4k pages.
Allocating 32 contiguous blocks per slab makes the slab size 128k. This is larger than the 85k size which will place the memory
in the large object heap. This means the GC will not try to relocate this array, so the fact it remains pinned does not negatively
affect memory management's compactification.
Max allocation block size for pooled blocks,
larger values can be leased but they will be disposed after use rather than returned to the pool.
4096 * 32 gives you a slabLength of 128k contiguous bytes allocated per slab
Thread-safe collection of blocks which are currently in the pool. A slab will pre-allocate all of the block tracking objects
and add them to this collection. When memory is requested it is taken from here first, and when it is returned it is re-added.
Thread-safe collection of slabs which have been allocated by this pool. As long as a slab is in this collection and slab.IsActive,
the blocks will be added to _blocks when returned.
This is part of implementing the IDisposable pattern.
This default value passed in to Rent to use the default value for the pool.
Called to take a block from the pool.
The block that is reserved for the called. It must be passed to Return when it is no longer being used.
Internal method called when a block is requested and the pool is empty. It allocates one additional slab, creates all of the
block tracking objects, and adds them all to the pool.
Called to return a block to the pool. Once Return has been called the memory no longer belongs to the caller, and
Very Bad Things will happen if the memory is read of modified subsequently. If a caller fails to call Return and the
block tracking object is garbage collected, the block tracking object's finalizer will automatically re-create and return
a new tracking object into the pool. This will only happen if there is a bug in the server, however it is necessary to avoid
leaving "dead zones" in the slab due to lost block tracking objects.
The block to return. It must have been acquired by calling Lease on the same memory pool instance.