Skip to content
Snippets Groups Projects
Commit 4907029b authored by Raghav RV's avatar Raghav RV Committed by GitHub
Browse files

[MRG+3] FIX Memory leak in MAE; Use safe_realloc; Acquire GIL only when...

[MRG+3] FIX Memory leak in MAE; Use safe_realloc; Acquire GIL only when raising; Propagate all errors to python interpreter level (#7811) (#8002)

* FIX MAE reg. criterion: Use safe_realloc to avoid memory leak

* Release GIL in safe_realloc and clean up scaffolding

* As gil is released in safe_realloc, no need of a with gil block

* Use except * to propagate error in all cdef functions

* Don't use except * for functions that return python objects

* Don't use except * for the comparison function passed to qsort

* Omissions and Errors

* Use safe_realloc now that gil is released there

* Fix realloc size

* Acquire GIL only if we need to raise

* Use except * more judiciously; Release gil only when raising; Add comments to clarify

* Actually that was unneeded; realloc will also allocate for the first time

* StackRecord*, PriorityHeapRecord* to fused type realloc_ptr; Use safe_realloc

* Use except -1 to propagate exceptions. This should avoid overheads

* Fix docstrings and add return 0 to reset methods

* TYPO

* REVIEW Remove redundant MemoryError raising calls
parent 08772c42
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment