MCPcopy Create free account
hub / github.com/python/cpython / _roundup

Method _roundup

Lib/multiprocessing/heap.py:153–156  ·  view source on GitHub ↗
(n, alignment)

Source from the content-addressed store, hash-verified

151
152 @staticmethod
153 def _roundup(n, alignment):
154 # alignment must be a power of 2
155 mask = alignment - 1
156 return (n + mask) & ~mask
157
158 def _new_arena(self, size):
159 # Create a new arena with at least the given *size*

Callers 2

_new_arenaMethod · 0.95
mallocMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected