Skip to content

Commit ff807f8

Browse files
committed
Fix incorrect use of allocate_memory()
1 parent d88361c commit ff807f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ STATIC void cleanup_after_vm(supervisor_allocation* heap, mp_obj_t exception) {
236236
size_t traceback_len = 0;
237237
mp_print_t print_count = {&traceback_len, count_strn};
238238
mp_obj_print_exception(&print_count, exception);
239-
prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, true);
239+
prev_traceback_allocation = allocate_memory(align32_size(traceback_len + 1), false, false);
240240
// Empirically, this never fails in practice - even when the heap is totally filled up
241241
// with single-block-sized objects referenced by a root pointer, exiting the VM frees
242242
// up several hundred bytes, sufficient for the traceback (which tends to be shortened

shared-bindings/supervisor/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ STATIC mp_obj_t supervisor_set_next_code_file(size_t n_args, const mp_obj_t *pos
195195
const char *filename = mp_obj_str_get_data(args.filename.u_obj, &len);
196196
free_memory(next_code_allocation);
197197
if (options != 0 || len != 0) {
198-
next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, true);
198+
next_code_allocation = allocate_memory(align32_size(sizeof(next_code_info_t) + len + 1), false, false);
199199
if (next_code_allocation == NULL) {
200200
m_malloc_fail(sizeof(next_code_info_t) + len + 1);
201201
}

0 commit comments

Comments
 (0)