summaryrefslogtreecommitdiff
path: root/py/malloc.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2021-03-01 15:18:32 -0600
committerJeff Epler <jepler@gmail.com>2021-03-01 15:18:32 -0600
commit238484ec261af55b90a39a8dcfc9fcdd6cb4390c (patch)
tree27811c903f8976b707ee325693521a877ca5661e /py/malloc.c
parent407a8c222a03166a03b8209f752e2a016e977d08 (diff)
parent532e7db293a041fb695ce2455ffdb6ac3a3bbf2d (diff)
Merge remote-tracking branch 'origin/main' into update-protomatter-rp2
Diffstat (limited to 'py/malloc.c')
-rw-r--r--py/malloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/malloc.c b/py/malloc.c
index 8d5141ee0..c923e89a6 100644
--- a/py/malloc.c
+++ b/py/malloc.c
@@ -57,7 +57,7 @@
#undef free
#undef realloc
#define malloc_ll(b, ll) gc_alloc((b), false, (ll))
-#define malloc_with_finaliser(b) gc_alloc((b), true, false)
+#define malloc_with_finaliser(b, ll) gc_alloc((b), true, (ll))
#define free gc_free
#define realloc(ptr, n) gc_realloc(ptr, n, true)
#define realloc_ext(ptr, n, mv) gc_realloc(ptr, n, mv)
@@ -103,8 +103,8 @@ void *m_malloc_maybe(size_t num_bytes, bool long_lived) {
}
#if MICROPY_ENABLE_FINALISER
-void *m_malloc_with_finaliser(size_t num_bytes) {
- void *ptr = malloc_with_finaliser(num_bytes);
+void *m_malloc_with_finaliser(size_t num_bytes, bool long_lived) {
+ void *ptr = malloc_with_finaliser(num_bytes, long_lived);
if (ptr == NULL && num_bytes != 0) {
m_malloc_fail(num_bytes);
}