diff options
author | Abseil Team <absl-team@google.com> | 2019-10-16 15:51:11 -0700 |
---|---|---|
committer | Andy Soffer <asoffer@google.com> | 2019-10-17 14:43:24 -0400 |
commit | a15364ce4d88534ae2295127e5d8e32aefb6b446 (patch) | |
tree | c01afa5f859f563b7bfd8cfdafa6b6fd1fed3aa6 /absl/base/internal | |
parent | ab3552a18964e7063c8324f45b3896a6a20b08a8 (diff) |
Export of internal Abseil changes
--
d35c72d705155dcd89a92835103540f14c643d10 by Gennadiy Rozental <rogeeff@google.com>:
helpxml changed to report types of flags with built-in value type.
PiperOrigin-RevId: 275131440
--
f3478792943d7dd40a6ef6083a8e5d374f43a65e by Abseil Team <absl-team@google.com>:
Add space padding tests for hex conversions.
PiperOrigin-RevId: 275120155
--
7c2e4725403e173660f33f94af686a75d3722936 by Andy Soffer <asoffer@google.com>:
Fix https://github.com/abseil/abseil-cpp/issues/379
by renaming `roundup` to `round_up`
PiperOrigin-RevId: 275106110
--
84cb30d6ee509961ac4359cfdda1360973b9527d by Laramie Leavitt <lar@google.com>:
Move random_internal::wide_multiply into a file by the same name.
PiperOrigin-RevId: 275059359
--
06d691a8c187b5d899e7863784b23bdcfd580cb2 by Abseil Team <absl-team@google.com>:
Add missing "return" keyword.
PiperOrigin-RevId: 275036408
GitOrigin-RevId: d35c72d705155dcd89a92835103540f14c643d10
Change-Id: Id837b4de6c9cfe18f0a088363754bfe389df985b
Diffstat (limited to 'absl/base/internal')
-rw-r--r-- | absl/base/internal/low_level_alloc.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc index 64d7aa80..f7314ab1 100644 --- a/absl/base/internal/low_level_alloc.cc +++ b/absl/base/internal/low_level_alloc.cc @@ -211,7 +211,7 @@ struct LowLevelAlloc::Arena { // Result of sysconf(_SC_PAGESIZE) const size_t pagesize; // Lowest power of two >= max(16, sizeof(AllocList)) - const size_t roundup; + const size_t round_up; // Smallest allocation block size const size_t min_size; // PRNG state @@ -336,11 +336,11 @@ size_t GetPageSize() { size_t RoundedUpBlockSize() { // Round up block sizes to a power of two close to the header size. - size_t roundup = 16; - while (roundup < sizeof(AllocList::Header)) { - roundup += roundup; + size_t round_up = 16; + while (round_up < sizeof(AllocList::Header)) { + round_up += round_up; } - return roundup; + return round_up; } } // namespace @@ -350,8 +350,8 @@ LowLevelAlloc::Arena::Arena(uint32_t flags_value) allocation_count(0), flags(flags_value), pagesize(GetPageSize()), - roundup(RoundedUpBlockSize()), - min_size(2 * roundup), + round_up(RoundedUpBlockSize()), + min_size(2 * round_up), random(0) { freelist.header.size = 0; freelist.header.magic = @@ -528,7 +528,7 @@ static void *DoAllocWithArena(size_t request, LowLevelAlloc::Arena *arena) { ArenaLock section(arena); // round up with header size_t req_rnd = RoundUp(CheckedAdd(request, sizeof (s->header)), - arena->roundup); + arena->round_up); for (;;) { // loop until we find a suitable region // find the minimum levels that a block of this size must have int i = LLA_SkiplistLevels(req_rnd, arena->min_size, nullptr) - 1; |