Since this will likely add some overhead I suspect that this would need to be feature gated but it can be very helpful for an application to ask "How much memory have I allocated right now?". Jemalloc has this API and I've reached for it more than once for instrumenting an application.