-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak of rb_ast_t in parser
ast_alloc uses TypedData_Make_Struct, which allocates a rb_ast_t. But it is overwritten when we set the DATA_PTR so the original memory is leaked. For example: 10.times do 100_000.times do eval("") end puts `ps -o rss= -p #{$$}` end Before: 17328 20752 23664 28400 30656 34224 37424 40784 43328 46656 After: 14320 14320 14320 14320 14320 14320 14320 14336 14336 14336
- Loading branch information
1 parent
95d036a
commit e3bfd25
Showing
1 changed file
with
14 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters