1

Recently I have been working on adding more accurate Memory Diagnostics to BenchmarkDotNet (not based on ETW, which notifies about allocation when more than 100KB was allocated). For the classic .NET I have used AppDomain.MonitoringTotalAllocatedMemorySize and for .NET Core (netcoreapp1.1) the GC.GetAllocatedBytesForCurrentThread() method which was recently introduced.

The problem is that Mono does not implement these methods. It throws NotImplementedException.

Is there any way to obtain the number of allocated bytes for Mono?

1
  • 1
    This shouldn't be difficult to add, by wrapping the mono_gc_alloc_* functions, but there doesn't appear to be any facility yet within Mono itself, let alone one it could expose. Oct 26, 2016 at 14:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.