Lines Matching defs:offUnsigned

261     uint64_t offUnsigned = off < 0 ? pThis->offCurPos : (uint64_t)off;
262 if (offUnsigned >= (uint64_t)pThis->Base.ObjInfo.cbObject)
267 pThis->offCurPos = offUnsigned;
274 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > (uint64_t)pThis->Base.ObjInfo.cbObject)
278 *pcbRead = cbLeftToRead = (size_t)((uint64_t)pThis->Base.ObjInfo.cbObject - offUnsigned);
294 PRTVFSMEMEXTENT pExtent = rtVfsMemFile_LocateExtent(pThis, offUnsigned, &fHit);
305 Assert(offUnsigned - pExtent->off < pExtent->cb);
306 size_t const offExtent = (size_t)(offUnsigned - pExtent->off);
311 memcpy(pbDst, &pExtent->abData[offUnsigned - pExtent->off], cbThisRead);
313 offUnsigned += cbThisRead;
333 Assert(!pExtent || pExtent->off > offUnsigned);
339 || offUnsigned + cbLeftToRead <= pExtent->off)
342 cbThisRead = (size_t)(pExtent->off - offUnsigned);
346 offUnsigned += cbThisRead;
357 pThis->offCurPos = offUnsigned;
363 * Allocates a new extent covering the ground at @a offUnsigned.
367 * @param offUnsigned The location to allocate the extent at.
369 * starting at @a offUnsigned.
370 * @param pNext The extention after @a offUnsigned. NULL if
374 static PRTVFSMEMEXTENT rtVfsMemFile_AllocExtent(PRTVFSMEMFILE pThis, uint64_t offUnsigned, size_t cbToWrite,
404 uint64_t offExtent = offUnsigned & ~(uint64_t)(pThis->cbExtent - 1);
459 uint64_t offUnsigned = off < 0 ? pThis->offCurPos : (uint64_t)off;
460 if (offUnsigned + cbLeftToWrite >= (uint64_t)RTFOFF_MAX)
466 PRTVFSMEMEXTENT pExtent = rtVfsMemFile_LocateExtent(pThis, offUnsigned, &fHit);
474 Assert(!pExtent || pExtent->off > offUnsigned);
481 uint64_t const cbToNext = pExtent ? pExtent->off - offUnsigned : UINT64_MAX;
484 offUnsigned += cbZeros;
489 Assert(!pExtent || offUnsigned <= pExtent->off);
490 if (pExtent && pExtent->off == offUnsigned)
498 pExtent = rtVfsMemFile_AllocExtent(pThis, offUnsigned, cbLeftToWrite, pExtent);
505 Assert(offUnsigned - pExtent->off < pExtent->cb);
510 uint32_t const offDst = (uint32_t)(offUnsigned - pExtent->off);
516 offUnsigned += cbLeftToWrite;
521 Assert(offUnsigned == pExtent->off + pExtent->cb);
527 fHit = pExtent && (offUnsigned - pExtent->off < pExtent->cb);
534 pThis->offCurPos = offUnsigned;
535 if ((uint64_t)pThis->Base.ObjInfo.cbObject < offUnsigned)
536 pThis->Base.ObjInfo.cbObject = offUnsigned;