From 79473691f2345bf343493143769e5730fe97cdf1 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Thu, 28 Sep 2023 14:57:51 +1000 Subject: [PATCH] {mimxrt,powerpc,samd}/mpconfigport: Don't override parse chunk alloc. This was copied from minimal/mpconfigport.h, but it doesn't make sense for general ports. Add a comment to minimal/mpconfigport.h to explain why it specifically overrides it. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared --- ports/mimxrt/mpconfigport.h | 1 - ports/minimal/mpconfigport.h | 2 ++ ports/powerpc/mpconfigport.h | 1 - ports/samd/mpconfigport.h | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index fb4acede59..d1fe17ee10 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -42,7 +42,6 @@ uint32_t trng_random_u32(void); #else #define MICROPY_GC_STACK_ENTRY_TYPE uint16_t #endif -#define MICROPY_ALLOC_PARSE_CHUNK_INIT (32) #define MICROPY_ALLOC_PATH_MAX (256) // MicroPython emitters diff --git a/ports/minimal/mpconfigport.h b/ports/minimal/mpconfigport.h index 0f50f8d389..56bef165fa 100644 --- a/ports/minimal/mpconfigport.h +++ b/ports/minimal/mpconfigport.h @@ -17,6 +17,8 @@ #define MICROPY_ENABLE_EXTERNAL_IMPORT (1) #define MICROPY_ALLOC_PATH_MAX (256) + +// Use the minimum headroom in the chunk allocator for parse nodes. #define MICROPY_ALLOC_PARSE_CHUNK_INIT (16) // type definitions for the specific machine diff --git a/ports/powerpc/mpconfigport.h b/ports/powerpc/mpconfigport.h index 084a461a4a..06200a9969 100644 --- a/ports/powerpc/mpconfigport.h +++ b/ports/powerpc/mpconfigport.h @@ -38,7 +38,6 @@ #define MICROPY_QSTR_BYTES_IN_HASH (1) #define MICROPY_QSTR_EXTRA_POOL mp_qstr_frozen_const_pool #define MICROPY_ALLOC_PATH_MAX (256) -#define MICROPY_ALLOC_PARSE_CHUNK_INIT (16) #define MICROPY_EMIT_X64 (0) #define MICROPY_EMIT_THUMB (0) #define MICROPY_EMIT_INLINE_THUMB (0) diff --git a/ports/samd/mpconfigport.h b/ports/samd/mpconfigport.h index c983d7e6d6..011119fd11 100644 --- a/ports/samd/mpconfigport.h +++ b/ports/samd/mpconfigport.h @@ -34,7 +34,6 @@ // Memory allocation policies #define MICROPY_GC_STACK_ENTRY_TYPE uint16_t #define MICROPY_GC_ALLOC_THRESHOLD (0) -#define MICROPY_ALLOC_PARSE_CHUNK_INIT (32) #define MICROPY_ALLOC_PATH_MAX (256) #define MICROPY_QSTR_BYTES_IN_HASH (1)