Skip to content

Commit 88a8043

Browse files
committed
py/malloc: MICROPY_MEM_STATS requires MICROPY_MALLOC_USES_ALLOCATED_SIZE.
Error out if they're set incompatibly.
1 parent f5e0970 commit 88a8043

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

py/malloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
#endif
4040

4141
#if MICROPY_MEM_STATS
42+
#if !MICROPY_MALLOC_USES_ALLOCATED_SIZE
43+
#error MICROPY_MEM_STATS requires MICROPY_MALLOC_USES_ALLOCATED_SIZE
44+
#endif
4245
#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); }
4346
#endif
4447

0 commit comments

Comments
 (0)