[NFC][Sanitizer] Fix incorrect desc of [beg, end] to [beg, end)
Correct the interval desc of ReleaseMemoryPagesToOS from [beg, end] to [beg, end), as it actually does. The previous incorrect description of [beg, end] might cause an incorrect invoke as follows: `ReleaseMemoryPagesToOS(0, kPageSize - 1);`
This commit is contained in:
@@ -166,7 +166,7 @@ uptr FindAvailableMemoryRange(uptr size, uptr alignment, uptr left_padding,
|
||||
|
||||
// Used to check if we can map shadow memory to a fixed location.
|
||||
bool MemoryRangeIsAvailable(uptr range_start, uptr range_end);
|
||||
// Releases memory pages entirely within the [beg, end] address range. Noop if
|
||||
// Releases memory pages entirely within the [beg, end) address range. Noop if
|
||||
// the provided range does not contain at least one entire page.
|
||||
void ReleaseMemoryPagesToOS(uptr beg, uptr end);
|
||||
void IncreaseTotalMmap(uptr size);
|
||||
|
||||
@@ -130,7 +130,7 @@ bool LibraryNameIs(const char *full_name, const char *base_name);
|
||||
// Call cb for each region mapped by map.
|
||||
void ForEachMappedRegion(link_map *map, void (*cb)(const void *, uptr));
|
||||
|
||||
// Releases memory pages entirely within the [beg, end] address range.
|
||||
// Releases memory pages entirely within the [beg, end) address range.
|
||||
// The pages no longer count toward RSS; reads are guaranteed to return 0.
|
||||
// Requires (but does not verify!) that pages are MAP_PRIVATE.
|
||||
inline void ReleaseMemoryPagesToOSAndZeroFill(uptr beg, uptr end) {
|
||||
|
||||
Reference in New Issue
Block a user