| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -51,6 +51,8 @@ | |
| # sys | ||
| "is_jython", "is_android", "is_emscripten", "is_wasi", | ||
| "check_impl_detail", "unix_shell", "setswitchinterval", | ||
| # os | ||
| "get_pagesize", | ||
| # network | ||
| "open_urlresource", | ||
| # processes | ||
| Expand Down Expand Up | @@ -1893,6 +1895,18 @@ def setswitchinterval(interval): | |
| return sys.setswitchinterval(interval) | ||
|
|
||
|
|
||
| def get_pagesize(): | ||
|
Comment thread
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI'll change https://github.com/python/cpython/blob/main/Lib/test/memory_watchdog.py#L13 to get_pagesize in other pr.
Sorry, something went wrong.
All reactions
Comment thread
hyeongyun0916 marked this conversation as resolved.
|
||
| """Get size of a page in bytes.""" | ||
| try: | ||
| page_size = os.sysconf('SC_PAGESIZE') | ||
| except (ValueError, AttributeError): | ||
| try: | ||
| page_size = os.sysconf('SC_PAGE_SIZE') | ||
| except (ValueError, AttributeError): | ||
| page_size = 4096 | ||
| return page_size | ||
|
Comment thread
hyeongyun0916 marked this conversation as resolved.
|
||
|
|
||
|
|
||
| @contextlib.contextmanager | ||
| def disable_faulthandler(): | ||
| import faulthandler | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.