Issue #2991 method getUsedMemory() was added.