[Mono-dev] field pointer and garbage collection

Alex Rønne Petersen alex at alexrp.com
Wed Jun 11 13:57:50 UTC 2014


Amendment: That being said, if you're actually writing new code,
prefer to check !sgen_ptr_in_nursery (obj) &&
sgen_object_safe_get_size (obj) <= SGEN_MAX_SMALL_OBJ_SIZE. That's
generally better than sgen_los_is_valid_object () which performs a
pass over all LOS objects.

On Wed, Jun 11, 2014 at 3:55 PM, Alex Rønne Petersen <alex at alexrp.com> wrote:
> Well, if you have a non-null object pointer and !sgen_ptr_in_nursery
> (obj) && !sgen_los_is_valid_object (obj) it must by necessity be in
> the major heap.
>
> On Wed, Jun 11, 2014 at 3:45 PM, serus <fabian.nagel at gmail.com> wrote:
>> Thanks for the hints. I looked through all three and while 1. and 3. solve
>> (1), they do not deal with the case I am interested in which is if the
>> object resides in the major heap (assuming a non-fixed major heap). Would
>> you happen to also have pointers for that case?
>>
>>
>>
>> --
>> View this message in context: http://mono.1490590.n4.nabble.com/field-pointer-and-garbage-collection-tp4663040p4663044.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