Implements totalMemory API