mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Fix memory leak in ruby_parser
For example:
10.times do
100_000.times do
eval("")
end
puts `ps -o rss= -p #{$$}`
end
Before:
19872
26480
32848
39504
45904
52672
59200
65760
72128
78496
After:
17328
20752
23664
28400
30656
34224
37424
40784
43328
46656
This commit is contained in:
parent
d75bbba255
commit
95d036aaf0
@ -518,6 +518,7 @@ parser_free(void *ptr)
|
||||
{
|
||||
struct ruby_parser *parser = (struct ruby_parser*)ptr;
|
||||
rb_ruby_parser_free(parser->parser_params);
|
||||
xfree(parser);
|
||||
}
|
||||
|
||||
static size_t
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user