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
Do not allocate `rb_ast_t` in `ast_alloc` to avoid memory leak. For example: 10.times do 100_000.times do eval("") end puts `ps -o rss= -p #{$$}` end Before: 17568 20960 24096 27808 31008 34160 37312 40464 43568 46816 After: 14432 14448 14496 14576 14592 15072 15072 15072 15072 15088
- Loading branch information