19 lines
531 B
C#
19 lines
531 B
C#
// 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();
|
|
}
|
|
}
|