Showing content from http://mail.python.org/pipermail/python-dev/attachments/20160831/b8edab90/attachment.html below:
<p dir="ltr">The PEP 445, C API for malloc, allows to plug multiple wrappers and each wrapper has its own "void* context" data. When you register a new wrapper, you store the current context and function to later chain it.</p>
<p dir="ltr">See the hooks example:<br>
<a href="https://www.python.org/dev/peps/pep-0445/#use-case-3-setup-hooks-on-memory-block-allocators">https://www.python.org/dev/peps/pep-0445/#use-case-3-setup-hooks-on-memory-block-allocators</a></p>
<p dir="ltr">Since the PEP 523 also adds a function, would it be possible to somehow design a mecanism to "chain wrappers"?</p>
<p dir="ltr">I know that the PEP 523 has a different design, so maybe it's not possible.</p>
<p dir="ltr">For example, the context can be passed to PyFrameEvalFunction. In this case, each project would have to register its own eval function, including vmprof. I don't know if it makes sense for vmprof to modify the behaviour at runtime (add a C frame per Python eval frame).</p>
<p dir="ltr">Victor</p>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4