summaryrefslogtreecommitdiff
path: root/py/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/malloc.c')
-rw-r--r--py/malloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/malloc.c b/py/malloc.c
index ea1d4c4b9..818a3e57a 100644
--- a/py/malloc.c
+++ b/py/malloc.c
@@ -39,6 +39,9 @@
#endif
#if MICROPY_MEM_STATS
+#if !MICROPY_MALLOC_USES_ALLOCATED_SIZE
+#error MICROPY_MEM_STATS requires MICROPY_MALLOC_USES_ALLOCATED_SIZE
+#endif
#define UPDATE_PEAK() { if (MP_STATE_MEM(current_bytes_allocated) > MP_STATE_MEM(peak_bytes_allocated)) MP_STATE_MEM(peak_bytes_allocated) = MP_STATE_MEM(current_bytes_allocated); }
#endif