diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-27 09:54:12 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-03-03 21:23:13 +0000 |
commit | d891452a73165966497f1c79b64276faaa664597 (patch) | |
tree | 6a04e942861bbcb6a7321dffd65895f3a38056a7 /py/mpconfig.h | |
parent | e104acdb8ccd53963f5415edc8c9ab88aeca771a (diff) |
py: Add MICROPY_MALLOC_USES_ALLOCATED_SIZE to allow simpler malloc API.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index acc5f6649..26d228785 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -112,6 +112,12 @@ #define MICROPY_MODULE_DICT_SIZE (1) #endif +// Whether realloc/free should be passed allocated memory region size +// You must enable this if MICROPY_MEM_STATS is enabled +#ifndef MICROPY_MALLOC_USES_ALLOCATED_SIZE +#define MICROPY_MALLOC_USES_ALLOCATED_SIZE (0) +#endif + // Number of bytes used to store qstr length // Dictates hard limit on maximum Python identifier length, but 1 byte // (limit of 255 bytes in an identifier) should be enough for everyone |