| 247 | |
| 248 | #ifndef JEMALLOC_JET |
| 249 | static |
| 250 | #endif |
| 251 | size_t |
| 252 | extent_size_quantize_ceil(size_t size) { |
| 253 | size_t ret; |
| 254 | |
| 255 | assert(size > 0); |
| 256 | assert(size - sz_large_pad <= LARGE_MAXCLASS); |
| 257 | assert((size & PAGE_MASK) == 0); |
| 258 | |
| 259 | ret = extent_size_quantize_floor(size); |
| 260 | if (ret < size) { |
| 261 | /* |
| 262 | * Skip a quantization that may have an adequately large extent, |
| 263 | * because under-sized extents may be mixed in. This only |
| 264 | * happens when an unusual size is requested, i.e. for aligned |
| 265 | * allocation, and is just one of several places where linear |
| 266 | * search would potentially find sufficiently aligned available |
| 267 | * memory somewhere lower. |
| 268 | */ |
| 269 | ret = sz_pind2sz(sz_psz2ind(ret - sz_large_pad + 1)) + |
| 270 | sz_large_pad; |
| 271 | } |
| 272 | return ret; |
| 273 | } |
| 274 | |
| 275 | /* Generate pairing heap functions. */ |
| 276 | ph_gen(, extent_heap_, extent_heap_t, extent_t, ph_link, extent_snad_comp) |