internal static unsafe UIntPtr SkipNonObjectData(UIntPtr objectAddr, UIntPtr limit) { // Skip any UNUSED_SPACE_TOKEN and ALIGNMENT_TOKEN areas while (true) { if (objectAddr >= limit) { break; } if (Allocator.IsAlignment(objectAddr)) { objectAddr += UIntPtr.Size; } else if (IsUnusedSpace(objectAddr)) { UIntPtr wordAfterUnused = objectAddr - PreHeader.Size + UIntPtr.Size; UIntPtr pageLimit = PageTable.PagePad(wordAfterUnused); CheckMemoryClear(wordAfterUnused, pageLimit); objectAddr = pageLimit + PreHeader.Size; } else if (Allocator.IsZeroVTable(objectAddr)) { // The rest of the page must not be used UIntPtr pageLimit = PageTable.PagePad(objectAddr); CheckMemoryClear(objectAddr, pageLimit); objectAddr = pageLimit + PreHeader.Size; } else { break; } } return(objectAddr); }