summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 3808df7430..e33a41f7a0 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -107,6 +107,15 @@
#define MICROPY_ALLOC_GC_STACK_SIZE (64)
#endif
+// Be conservative and always clear to zero newly (re)allocated memory in the GC.
+// This helps eliminate stray pointers that hold on to memory that's no longer
+// used. It decreases performance due to unnecessary memory clearing.
+// TODO Do analysis to understand why some memory is not properly cleared and
+// find a more efficient way to clear it.
+#ifndef MICROPY_GC_CONSERVATIVE_CLEAR
+#define MICROPY_GC_CONSERVATIVE_CLEAR (1)
+#endif
+
// Support automatic GC when reaching allocation threshold,
// configurable by gc.threshold().
#ifndef MICROPY_GC_ALLOC_THRESHOLD
@@ -572,6 +581,11 @@ typedef double mp_float_t;
#define MICROPY_USE_INTERNAL_ERRNO (0)
#endif
+// Whether to use internally defined *printf() functions (otherwise external ones)
+#ifndef MICROPY_USE_INTERNAL_PRINTF
+#define MICROPY_USE_INTERNAL_PRINTF (1)
+#endif
+
// Support for user-space VFS mount (selected ports)
#ifndef MICROPY_FSUSERMOUNT
#define MICROPY_FSUSERMOUNT (0)
@@ -887,6 +901,11 @@ typedef double mp_float_t;
#define MICROPY_PY_UBINASCII (0)
#endif
+// Depends on MICROPY_PY_UZLIB
+#ifndef MICROPY_PY_UBINASCII_CRC32
+#define MICROPY_PY_UBINASCII_CRC32 (0)
+#endif
+
#ifndef MICROPY_PY_URANDOM
#define MICROPY_PY_URANDOM (0)
#endif
@@ -909,6 +928,10 @@ typedef double mp_float_t;
#define MICROPY_PY_MACHINE_I2C (0)
#endif
+#ifndef MICROPY_PY_MACHINE_SPI
+#define MICROPY_PY_MACHINE_SPI (0)
+#endif
+
#ifndef MICROPY_PY_USSL
#define MICROPY_PY_USSL (0)
#endif