MEMORYMemory introspection subcommands.
| Syntax | MEMORY USAGE key [SAMPLES count] | STATS | DOCTOR | PURGE | MALLOC-STATS |
| Group | server |
| Arity | -2 |
| Since | 1.0.0 |
| Flags | readonly |
| Complexity | USAGE: O(1) — the accounting is exact, not sampled. STATS: O(1) from the instance-wide gauges |
| Redis compatibility | differs: USAGE's SAMPLES count is parsed and ignored (our accounting is exact); PURGE is a no-op (system allocator, no arena); DOCTOR and MALLOC-STATS return canned strings; STATS is a trimmed 8-field set |