Skip to content

Commit 2eaa4fe

Browse files
dpgeorgewiznet-grace
authored andcommitted
unix/alloc: Remove unused MICROPY_FORCE_PLAT_ALLOC_EXEC option.
The `MICROPY_FORCE_PLAT_ALLOC_EXEC` config option was made obsolete by commit 9796625, so remove it. Signed-off-by: Damien George <[email protected]>
1 parent fdc7bb6 commit 2eaa4fe

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

ports/unix/alloc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include "py/mpstate.h"
3434

35-
#if MICROPY_EMIT_NATIVE || (MICROPY_PY_FFI && MICROPY_FORCE_PLAT_ALLOC_EXEC)
35+
#if MICROPY_EMIT_NATIVE
3636

3737
#if defined(__OpenBSD__) || defined(__MACH__)
3838
#define MAP_ANONYMOUS MAP_ANON
@@ -80,4 +80,4 @@ void mp_unix_free_exec(void *ptr, size_t size) {
8080

8181
MP_REGISTER_ROOT_POINTER(void *mmap_region_head);
8282

83-
#endif // MICROPY_EMIT_NATIVE || (MICROPY_PY_FFI && MICROPY_FORCE_PLAT_ALLOC_EXEC)
83+
#endif // MICROPY_EMIT_NATIVE

ports/unix/mpconfigport.h

-5
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,6 @@ void mp_unix_alloc_exec(size_t min_size, void **ptr, size_t *size);
170170
void mp_unix_free_exec(void *ptr, size_t size);
171171
#define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size)
172172
#define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
173-
#ifndef MICROPY_FORCE_PLAT_ALLOC_EXEC
174-
// Use MP_PLAT_ALLOC_EXEC for any executable memory allocation, including for FFI
175-
// (overriding libffi own implementation)
176-
#define MICROPY_FORCE_PLAT_ALLOC_EXEC (1)
177-
#endif
178173

179174
// If enabled, configure how to seed random on init.
180175
#ifdef MICROPY_PY_RANDOM_SEED_INIT_FUNC

0 commit comments

Comments
 (0)