MCPcopy Create free account
hub / github.com/beefytech/Beef / pages

Function pages

BeefRT/gperftools/src/common.h:148–151  ·  view source on GitHub ↗

Convert byte size into pages. This won't overflow, but may return an unreasonably large value if bytes is huge enough.

Source from the content-addressed store, hash-verified

146// Convert byte size into pages. This won't overflow, but may return
147// an unreasonably large value if bytes is huge enough.
148inline Length pages(size_t bytes) {
149 return (bytes >> kPageShift) +
150 ((bytes & (kPageSize - 1)) > 0 ? 1 : 0);
151}
152
153// For larger allocation sizes, we use larger memory alignments to
154// reduce the number of size classes.

Callers 6

DoSampledAllocationFunction · 0.70
do_malloc_pagesFunction · 0.70
do_memalignFunction · 0.70
BF_do_malloc_pagesFunction · 0.50
BF_do_malloc_pagesFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected