mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-07-09 02:08:11 +00:00
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.IO.Meta` builds the normal Nuget package that is used by all other projects and includes all namespaces. `SabreTools.IO` builds to `SabreTools.IO.Common` to avoid overwriting issues on publish.
30 lines
599 B
C#
30 lines
599 B
C#
using System.Threading;
|
|
|
|
namespace SabreTools.IO.Compression.zlib
|
|
{
|
|
#pragma warning disable IDE0036
|
|
#pragma warning disable IDE0380
|
|
public unsafe static class MemoryStats
|
|
{
|
|
private static int _allocations;
|
|
|
|
public static int Allocations
|
|
{
|
|
get
|
|
{
|
|
return _allocations;
|
|
}
|
|
}
|
|
|
|
internal static void Allocated()
|
|
{
|
|
Interlocked.Increment(ref _allocations);
|
|
}
|
|
|
|
internal static void Freed()
|
|
{
|
|
Interlocked.Decrement(ref _allocations);
|
|
}
|
|
}
|
|
}
|