Skip to content

正規表現マッチでメモリリーク? #77

Description

正規表現マッチを繰り返すとそれだけでプロセスのメモリ使用量が増えてゆく。マッチした場合はマッチしない場合より大きく増える。

1.times {/abc/ =~ "abc"} => 3100KB
1.times {/abc/ =~ "axc"} => 3092KB
1000.times {/abc/ =~ "abc"} => 7728KB
1000.times {/abc/ =~ "axc"} => 3480KB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions