• Kunshan Wang's avatar
    Emphasise what "iref" is and what it can refer to. · 643ac0b3
    Kunshan Wang authored
    IRef refers to any memory location in any parts of the Mu memory,
    including both heap, stack and global. The common part about them is
    that Mu knows the types (at least the location of reference fields) of
    all of them. We use the term "conceptually boxed" and "conceptually
    unboxed" to describe the difference between the destination of "iref"
    and "uptr": irefs always refer into "conceptually boxed" things (boxed
    in the sense that Mu knows their field types (at least reference
    fields)). Heap objects are obviously boxed. We can consider each stack
    as a huge box, and the entire global space as a huge box. "iref" can
    only be obtained from the allocation operations in Mu. But uptrs may
    point outside the Mu memory, which can be literally anywhere. They can
    even be created by C functions, such as "malloc".
memory.rst 21.1 KB