123456789101112131415161718192021222324252627 |
- using System.Threading;
- namespace Hebron.Runtime
- {
- internal 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);
- }
- }
- }
|