dymokomi/luce-browser-foundation
Source of release 0.6.1
0.6.1 / src / gc / module.lucb
#==============================================================================================
#
# gc - LibGC: cells, the heap, roots and weak references
#
# DESCRIPTION:
# Part of the luce-browser port of Ladybird (47c82b38d0) to luce-base, DESIGN.md §4.1.
# LibGC ported faithfully (DESIGN.md §3.2): heap blocks, cell allocators, precise marking
# through visit_edges, conservative roots from the stack and registers, finalization,
# weak cells and post-GC tasks. The additions of §3.2-§3.4 (managed blobs, atomic blobs,
# the large-object space, the heap as luce-base's `Allocator`, the collector's own C-heap
# containers, the stack and register scan in `asm`) are marked as such in their fragments.
#
# Copyright (c) 2018-2026, the Ladybird developers.
# Copyright (c) 2026 the luce-browser authors.
# SPDX-License-Identifier: BSD-2-Clause (see LICENSE)
#
#==============================================================================================
import ak
import memory
import os
import luce
import time
import io