We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c959860 commit 7c8d76fCopy full SHA for 7c8d76f
1 file changed
unix/alloc.c
@@ -86,13 +86,20 @@ void mp_unix_mark_exec(void) {
86
}
87
88
#if MICROPY_FORCE_PLAT_ALLOC_EXEC
89
+// Provide implementation of libffi ffi_closure_* functions in terms
90
+// of the functions above. On a normal Linux system, this save a lot
91
+// of code size.
92
+void *ffi_closure_alloc(size_t size, void **code);
93
+void ffi_closure_free(void *ptr);
94
+
95
void *ffi_closure_alloc(size_t size, void **code) {
96
mp_uint_t dummy;
97
mp_unix_alloc_exec(size, code, &dummy);
98
return *code;
99
100
101
void ffi_closure_free(void *ptr) {
102
+ (void)ptr;
103
// TODO
104
105
#endif
0 commit comments