[Mono-dev] field pointer and garbage collection

Alex Rønne Petersen alex at alexrp.com
Wed Jun 11 12:17:55 UTC 2014


There are 3 relevant functions for this:

1. sgen_ptr_in_nursery ()
2. sgen_safe_get_object_size ()
3. sgen_ptr_is_in_los ()

grep for those in mono/metadata to see how they work and how they're used.

On Wed, Jun 11, 2014 at 2:13 PM, serus <fabian.nagel at gmail.com> wrote:
> Thanks for the info.
>
> From what I understood, a conventional collector would treat all values
> found on stack / registers as potential pointers. To pin the object, it
> needs to 1) find out if the pointer is pointing to an actual object or to a
> random memory address; and 2) find the base address of the object in case it
> is an interior pointer.
>
> How does Mono test for (1) and is the assumption that (2) is computed using
> the alignment of sgen-blocks and their slot size correct?
>
>
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/field-pointer-and-garbage-collection-tp4663040p4663042.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list


More information about the Mono-devel-list mailing list