Skip to content

Commit 08fff2d

Browse files
committed
Add missing port clause in memory.c
Adds a missing clause to handle port terms in `memory_estimate_usage(term)` function that is necessary for formatting ports for io or other purposes. Signed-off-by: Winford <winford@object.stream>
1 parent 439f9eb commit 08fff2d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libAtomVM/memory.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,10 @@ static void memory_scan_and_copy(HeapFragment *old_fragment, term *mem_start, co
594594
TRACE("Found PID (%" TERM_X_FMT ")\n", t);
595595
ptr++;
596596

597+
} else if (term_is_local_port(t)) {
598+
TRACE("Found port (%" TERM_X_FMT ")\n", t);
599+
ptr++;
600+
597601
} else if ((t & 0x3) == 0x0) {
598602
TRACE("Found boxed header (%" TERM_X_FMT ")\n", t);
599603

0 commit comments

Comments
 (0)