-
Notifications
You must be signed in to change notification settings - Fork 30
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Leak using & operator #20
Comments
I did not write the code, but I have checked that the Python code does free its memory as I think it should. Then I launched your program and let it run for several minutes, monitoring the process' memory usage, and it was absolutely flat (and tiny), with no increase. That does prove that there is no leak, of course. |
Thank you for reporting the issue. I will investigate. |
The issue comes from function Fixed in db725fc There remains a memory leak with this code: def main():
loop_one_count = 100000
loop_two_count = 300000
for i in range(0, loop_one_count):
bitmap_one = BitMap()
for j in range(0, loop_two_count):
bitmap_two = BitMap()
bitmap_three = BitMap.union(bitmap_one, bitmap_two, bitmap_two) But it seems that here the issue comes from CRoaring (I made a pull request: RoaringBitmap/CRoaring#104). I will create a new release and close this issue when the leak on CRoaring's side will also be fixed. |
Awesome, I really appreciate it! It looks like the CRoaring PR was merged and CRoaring releases fairly frequently. I was expecting I'd have to get my hands dirty- and I haven't touched C in years. :) |
Yes, CRoaring PR merged! I made a new Pyroaring release. |
+1 |
I'm using your library in an architecture where I am having to AND over many, many iterations. I've found that the library leaks memory over time.
I haven't dug deep into the code yet, but I did write an example script that can show the issue.
This will eventually fill your memory, even if you do a gc.collect() inside the for loop.
The text was updated successfully, but these errors were encountered: