- Notifications
You must be signed in to change notification settings - Fork27
FIX memoryview leaks and retrofit memory-manager as context-managers#33
New issue
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
+ Possible fixinggitpython-developers#31 by stop decrement ondestruction, rely only on `with...` resources.+ feat(mmap): utility to check if regions have been closed (PY3-only).
+ Add PY3 compat utilities+ doc(changes, tutorial): update on mman usage
+ doc(tutorial): update use-cases+ doc(changes): new bullet.
+ feat(mman): report missed exits.
+ All gitdb TCs now pass without explit release!
coveralls commentedOct 27, 2016
1 similar comment
coveralls commentedOct 27, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
ankostis commentedOct 27, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Byron can you check these lineswhere a It took me the half month to realize that this is leaking badly, and I want you to check the history of this commits leading up to it, because I cannot understand whether they were mistake or intentional, and what would be the repercussions (ie, performance?). |
@ankostis Sorry for the very late reply. I am no holiday now, and am working through everything that piled up. |
Yes, it is a python-3 issue, because the destructors are not deterministic. Now, in python3, you can slice memmaps as if they were |
If using direct access would be a solution, then it probably should be used instead. Correctness over performance I would say. |
BREAKING API:
retrofit
git.util.mman
as context-manager,to release memory-mapped regions held.
Themmap-manager(s) are re-entrant, but not thread-safecontext-manager(s),
to be used within a
with ...:
block, ensuring any left-overs cursors are cleaned up.If not entered, :meth:
StaticWindowMapManager.make_cursor()
and/or:meth:
WindowCursor.use_region()
will scream.Get them from
smmap.managed_mmaps()
.Simplify :class:
SlidingWindowMapBuffer
as create/close context-manager(no
begin_access()
, orend_access()
).