Lines Matching defs:CommitBase

40   uptr CommitBase;
88 uptr CommitBase = 0;
96 bool isValid() { return CommitBase != 0; }
98 void invalidate() { CommitBase = 0; }
110 void store(UNUSED Options Options, UNUSED uptr CommitBase,
140 bool mapSecondary(const Options &Options, uptr CommitBase, uptr CommitSize,
152 const uptr TaggedSize = AllocPos - CommitBase;
155 return MemMap.remap(CommitBase, TaggedSize, "scudo:secondary",
162 return MemMap.remap(CommitBase, CommitSize, "scudo:secondary",
171 Max(AllocPos, CommitBase + MaxUnreleasedCacheBytes);
172 return MemMap.remap(CommitBase, UntaggedPos - CommitBase, "scudo:secondary",
174 MemMap.remap(UntaggedPos, CommitBase + CommitSize - UntaggedPos,
179 return MemMap.remap(CommitBase, CommitSize, "scudo:secondary", RemapFlags);
222 Entry.CommitBase, Entry.CommitBase + Entry.CommitSize,
256 void store(const Options &Options, uptr CommitBase, uptr CommitSize,
264 Entry.CommitBase = CommitBase;
277 mapSecondary<Config>(Options, Entry.CommitBase, Entry.CommitSize,
278 Entry.CommitBase, MAP_NOACCESS, Entry.MemMap);
280 Entry.MemMap.setMemoryPermission(Entry.CommitBase, Entry.CommitSize,
370 // amount of unused bytes is exactly EntryHeaderPos - CommitBase.
372 // CommitBase CommitBase + CommitSize
381 // [EntryHeaderPos, CommitBase + CommitSize) contains the user data as
382 // well as the header metadata. If EntryHeaderPos - CommitBase exceeds
386 const uptr CommitBase = Entry.CommitBase;
389 roundDown(CommitBase + CommitSize - Size, Alignment);
393 if (HeaderPos > CommitBase + CommitSize)
395 // TODO: Remove AllocPos > CommitBase + MaxAllowedFragmentedBytes
397 if (HeaderPos < CommitBase ||
398 AllocPos > CommitBase + MaxAllowedFragmentedBytes) {
402 const uptr Diff = roundDown(HeaderPos, PageSize) - CommitBase;
416 (CommitBase + CommitSize - HeaderPos) / FragmentedBytesDivisor;
446 roundDown(EntryHeaderPos, PageSize) - Entry.CommitBase;
455 Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, BytesToRelease);
503 Entry.MemMap.setMemoryPermission(Entry.CommitBase, Entry.CommitSize, 0);
553 Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
610 return B->CommitBase + B->CommitSize;
696 Entry.MemMap.setMemoryPermission(Entry.CommitBase, Entry.CommitSize, 0);
698 storeTags(LargeBlock::addHeaderTag<Config>(Entry.CommitBase),
707 H->CommitBase = Entry.CommitBase;
711 const uptr BlockEnd = H->CommitBase + H->CommitSize;
780 uptr CommitBase = MapBase + PageSize;
789 CommitBase = roundUp(MapBase + PageSize + 1, Alignment) - PageSize;
790 const uptr NewMapBase = CommitBase - PageSize;
799 CommitBase + PageSize + roundUp(Size, PageSize) + PageSize;
807 const uptr CommitSize = MapEnd - PageSize - CommitBase;
808 const uptr AllocPos = roundDown(CommitBase + CommitSize - Size, Alignment);
809 if (!mapSecondary<Config>(Options, CommitBase, CommitSize, AllocPos, 0,
818 storeTags(LargeBlock::addHeaderTag<Config>(CommitBase),
820 H->CommitBase = CommitBase;
824 *BlockEndPtr = CommitBase + CommitSize;
855 Cache.store(Options, H->CommitBase, H->CommitSize,