• Kirill Smelkov's avatar
    bigfile/py/loadblk: Resort to pybuf unpinninf, if nothing helps · 024c246c
    Kirill Smelkov authored
    There are situations possible when both exc_traceback and frame objects are
    garbage-collected, but frame's f_locals remains not collected because e.g. it
    was explicitly added to somewhere. We cannot detect such cases (dicts are not
    listed in referrers).
    
    So if nothing helped, as a last resort, unpin pybuf from its original
    memory and make it point to zero-sized NULL.
    
    In general this is not strictly correct to do as other buffers &
    memoryview objects created from pybuf, copy its pointer on
    initialization and thus pybuf unpinning won't adjust them.
    
    However we require BigFile implementations to make sure not to use
    such-created objects, if any, after return from loadblk().
    
    Finally fixes #7
    024c246c
Name
Last commit
Last update
3rdparty Loading commit data...
bigarray Loading commit data...
bigfile Loading commit data...
demo Loading commit data...
include/wendelin Loading commit data...
lib Loading commit data...
t Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
README.rst Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...
wendelin.py Loading commit data...