diff options
| -rw-r--r-- | ports/esp8266/posix_helpers.c | 2 | ||||
| -rw-r--r-- | ports/unix/coverage.c | 2 | ||||
| -rw-r--r-- | py/malloc.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ports/esp8266/posix_helpers.c b/ports/esp8266/posix_helpers.c index b72c4ff9d..11c9dc36d 100644 --- a/ports/esp8266/posix_helpers.c +++ b/ports/esp8266/posix_helpers.c @@ -33,7 +33,7 @@ // Functions for external libs like axTLS, BerkeleyDB, etc. void *malloc(size_t size) { - void *p = gc_alloc(size, false); + void *p = gc_alloc(size, 0); if (p == NULL) { // POSIX requires ENOMEM to be set in case of error errno = ENOMEM; diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index b7c3d2c25..e47558689 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -270,7 +270,7 @@ static mp_obj_t extra_coverage(void) { gc_unlock(); // using gc_realloc to resize to 0, which means free the memory - void *p = gc_alloc(4, false); + void *p = gc_alloc(4, 0); mp_printf(&mp_plat_print, "%p\n", gc_realloc(p, 0, false)); // calling gc_nbytes with a non-heap pointer diff --git a/py/malloc.c b/py/malloc.c index 05daeb35d..5135dc26b 100644 --- a/py/malloc.c +++ b/py/malloc.c @@ -56,8 +56,8 @@ #undef malloc #undef free #undef realloc -#define malloc(b) gc_alloc((b), false) -#define malloc_with_finaliser(b) gc_alloc((b), true) +#define malloc(b) gc_alloc((b), 0) +#define malloc_with_finaliser(b) gc_alloc((b), GC_ALLOC_FLAG_HAS_FINALISER) #define free gc_free #define realloc(ptr, n) gc_realloc(ptr, n, true) #define realloc_ext(ptr, n, mv) gc_realloc(ptr, n, mv) |
