# MEMORY MALLOC-STATS

> Return memory allocated, peak and resident figures as a short text report.

URL: https://docs.hotkv.com/commands/memory-malloc-stats/

```
MEMORY MALLOC-STATS
```

- Group: Server
- HotKV Cloud: all plans
- On-Premise: no license needed

`MEMORY MALLOC-STATS` returns a short text report: a heading line, then
three `name:value` lines in bytes.

| Line | Meaning |
| --- | --- |
| `allocated` | Memory in use now (`used_memory` in [INFO](https://docs.hotkv.com/commands/info/index.md)). |
| `peak_allocated` | Highest memory use since the server started. |
| `resident` | Memory the process holds (`used_memory_rss`). |

For a full breakdown use [MEMORY STATS](https://docs.hotkv.com/commands/memory-stats/index.md).

## Return value

The text, with `\r\n` line endings: a bulk string in RESP2, a verbatim string
(`txt`) in RESP3.

## Compatibility

Redis 7 and Valkey 8 return the memory allocator's own detailed statistics,
whose format depends on the allocator. HotKV returns only the three figures
above, so scripts that parse Redis's output need adjusting.

## See also

[MEMORY STATS](https://docs.hotkv.com/commands/memory-stats/index.md), [INFO](https://docs.hotkv.com/commands/info/index.md)