Skip to content

Commit a64f2d3

Browse files
authored
Merge pull request atomvm#510 from pguyot/w16/fix-allocation-computation-in-stacktrace_build
Fix allocation computation in `stacktrace_build`
2 parents 1950aaa + ccaa5d4 commit a64f2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libAtomVM/stacktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ term stacktrace_build(Context *ctx, term *stack_info)
261261
//
262262
// [{module, function, arity, [{file, string()}, {line, int}]}, ...]
263263
//
264-
size_t requested_size = (TUPLE_SIZE(4) + 2) * num_frames + num_aux_terms * (2 + 2 * TUPLE_SIZE(2)) + 2 * filename_lens;
264+
size_t requested_size = (TUPLE_SIZE(4) + 2) * num_frames + num_aux_terms * (4 + 2 * TUPLE_SIZE(2)) + 2 * filename_lens;
265265
if (UNLIKELY(memory_ensure_free(ctx, requested_size) != MEMORY_GC_OK)) {
266266
free(module_paths);
267267
return OUT_OF_MEMORY_ATOM;

0 commit comments

Comments
 (0)