MCPcopy Index your code
hub / github.com/python/cpython / get_pagesize

Function get_pagesize

Lib/test/support/__init__.py:2152–2161  ·  view source on GitHub ↗

Get size of a page in bytes.

()

Source from the content-addressed store, hash-verified

2150
2151
2152def get_pagesize():
2153 """Get size of a page in bytes."""
2154 try:
2155 page_size = os.sysconf('SC_PAGESIZE')
2156 except (ValueError, AttributeError):
2157 try:
2158 page_size = os.sysconf('SC_PAGE_SIZE')
2159 except (ValueError, AttributeError):
2160 page_size = 4096
2161 return page_size
2162
2163
2164@contextlib.contextmanager

Callers 2

memory_watchdog.pyFile · 0.90
test_fcntl_f_pipesizeMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_fcntl_f_pipesizeMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…