@@ -13,8 +13,8 @@ namespace snmalloc
1313 * It cannot unreserve memory, so this does not require the
1414 * usual complexity of a buddy allocator.
1515 */
16- template <typename Pal >
17- class AddressSpaceManager : public Pal
16+ template <typename PAL >
17+ class AddressSpaceManager : public PAL
1818 {
1919 /* *
2020 * Stores the blocks of address space
@@ -160,7 +160,7 @@ namespace snmalloc
160160 auto page_start = pointer_align_down<OS_PAGE_SIZE, char >(base);
161161 auto page_end =
162162 pointer_align_up<OS_PAGE_SIZE, char >(pointer_offset (base, size));
163- Pal ::template notify_using<NoZero>(
163+ PAL ::template notify_using<NoZero>(
164164 page_start, static_cast <size_t >(page_end - page_start));
165165 }
166166
@@ -178,10 +178,10 @@ namespace snmalloc
178178 SNMALLOC_ASSERT (bits::next_pow2 (size) == size);
179179 SNMALLOC_ASSERT (size >= sizeof (void *));
180180
181- if constexpr (pal_supports<AlignedAllocation, Pal >)
181+ if constexpr (pal_supports<AlignedAllocation, PAL >)
182182 {
183- if (size >= Pal ::minimum_alloc_size)
184- return static_cast <Pal *>(this )->template reserve_aligned <committed>(
183+ if (size >= PAL ::minimum_alloc_size)
184+ return static_cast <PAL *>(this )->template reserve_aligned <committed>(
185185 size);
186186 }
187187
@@ -194,20 +194,20 @@ namespace snmalloc
194194 // Allocation failed ask OS for more memory
195195 void * block;
196196 size_t block_size;
197- if constexpr (pal_supports<AlignedAllocation, Pal >)
197+ if constexpr (pal_supports<AlignedAllocation, PAL >)
198198 {
199- block_size = Pal ::minimum_alloc_size;
200- block = static_cast <Pal *>(this )->template reserve_aligned <false >(
199+ block_size = PAL ::minimum_alloc_size;
200+ block = static_cast <PAL *>(this )->template reserve_aligned <false >(
201201 block_size);
202202 }
203203 else
204204 {
205205 // Need at least 2 times the space to guarantee alignment.
206206 // Hold lock here as a race could cause additional requests to
207- // the Pal , and this could lead to suprious OOM. This is
208- // particularly bad if the Pal gives all the memory on first call.
207+ // the PAL , and this could lead to suprious OOM. This is
208+ // particularly bad if the PAL gives all the memory on first call.
209209 auto block_and_size =
210- static_cast <Pal *>(this )->reserve_at_least (size * 2 );
210+ static_cast <PAL *>(this )->reserve_at_least (size * 2 );
211211 block = block_and_size.first ;
212212 block_size = block_and_size.second ;
213213
0 commit comments