summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-09-26 22:35:48 +1000
committerDamien George <damien@micropython.org>2024-10-03 11:09:42 +1000
commit70a01550c9630b6bc1f0e66b54898286e8b49c0d (patch)
tree5aa1a2b6b5cb30ca4cf78bb027f849e307522a89
parent1291718916d023624be2b66d7396aa111eb8cbd5 (diff)
unix/alloc: Remove unused MICROPY_FORCE_PLAT_ALLOC_EXEC option.
The `MICROPY_FORCE_PLAT_ALLOC_EXEC` config option was made obsolete by commit 97966254577167f4c50200af1af89109a275da1c, so remove it. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/unix/alloc.c4
-rw-r--r--ports/unix/mpconfigport.h5
2 files changed, 2 insertions, 7 deletions
diff --git a/ports/unix/alloc.c b/ports/unix/alloc.c
index 9ef19cb43..9ab2ca04e 100644
--- a/ports/unix/alloc.c
+++ b/ports/unix/alloc.c
@@ -32,7 +32,7 @@
#include "py/mpstate.h"
-#if MICROPY_EMIT_NATIVE || (MICROPY_PY_FFI && MICROPY_FORCE_PLAT_ALLOC_EXEC)
+#if MICROPY_EMIT_NATIVE
#if defined(__OpenBSD__) || defined(__MACH__)
#define MAP_ANONYMOUS MAP_ANON
@@ -80,4 +80,4 @@ void mp_unix_free_exec(void *ptr, size_t size) {
MP_REGISTER_ROOT_POINTER(void *mmap_region_head);
-#endif // MICROPY_EMIT_NATIVE || (MICROPY_PY_FFI && MICROPY_FORCE_PLAT_ALLOC_EXEC)
+#endif // MICROPY_EMIT_NATIVE
diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h
index c12c0c9d9..21ce75a35 100644
--- a/ports/unix/mpconfigport.h
+++ b/ports/unix/mpconfigport.h
@@ -170,11 +170,6 @@ void mp_unix_alloc_exec(size_t min_size, void **ptr, size_t *size);
void mp_unix_free_exec(void *ptr, size_t size);
#define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size)
#define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
-#ifndef MICROPY_FORCE_PLAT_ALLOC_EXEC
-// Use MP_PLAT_ALLOC_EXEC for any executable memory allocation, including for FFI
-// (overriding libffi own implementation)
-#define MICROPY_FORCE_PLAT_ALLOC_EXEC (1)
-#endif
// If enabled, configure how to seed random on init.
#ifdef MICROPY_PY_RANDOM_SEED_INIT_FUNC