LibUv Networking (#65)
This commit is contained in:
parent
ec6629fbe9
commit
5e2be2d7b6
69 changed files with 5612 additions and 586 deletions
19
Projects/Server/Buffers/MemoryPoolFactory.cs
Normal file
19
Projects/Server/Buffers/MemoryPoolFactory.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
namespace System.Buffers
|
||||
{
|
||||
public static class SlabMemoryPoolFactory
|
||||
{
|
||||
public static MemoryPool<byte> Create()
|
||||
{
|
||||
#if DEBUG
|
||||
return new DiagnosticMemoryPool(CreateSlabMemoryPool());
|
||||
#else
|
||||
return CreateSlabMemoryPool();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static MemoryPool<byte> CreateSlabMemoryPool() => new SlabMemoryPool();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue