diff options
author | Björn Gustavsson <[email protected]> | 2013-09-05 07:38:39 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-09-18 10:22:30 +0200 |
commit | 5b96f21257c1782af5ee8c58f5c726f91ba56c83 (patch) | |
tree | 15cb068abdc00fe3151c78abcf3093188127df92 | |
parent | 046ceb4469ad0a7a6856f1c28216cb42cffedf0a (diff) | |
download | otp-5b96f21257c1782af5ee8c58f5c726f91ba56c83.tar.gz otp-5b96f21257c1782af5ee8c58f5c726f91ba56c83.tar.bz2 otp-5b96f21257c1782af5ee8c58f5c726f91ba56c83.zip |
asn1ct_parser2: Clean the process dictionary after parsing
Apart from cleanliness, the test suite runs many tests cases in
parallel, so it never hurts to reduce the memory pressure.
-rw-r--r-- | lib/asn1/src/asn1ct_parser2.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1ct_parser2.erl b/lib/asn1/src/asn1ct_parser2.erl index 1abccc8626..283616b157 100644 --- a/lib/asn1/src/asn1ct_parser2.erl +++ b/lib/asn1/src/asn1ct_parser2.erl @@ -38,6 +38,7 @@ parse(Tokens) -> {error,{Reason,hd(Tokens)}}; {ModuleDefinition,Rest1} -> {Types,Rest2} = parse_AssignmentList(Rest1), + clean_process_dictionary(), case Rest2 of [{'END',_}|_Rest3] -> {ok,ModuleDefinition#module{typeorval = Types}}; @@ -48,6 +49,13 @@ parse(Tokens) -> end end. +clean_process_dictionary() -> + Mod = erase(asn1_module), + _ = erase({Mod,imports}), + _ = erase(tagdefault), + _ = erase(extensiondefault), + ok. + parse_ModuleDefinition([{typereference,L1,ModuleIdentifier}|Rest0]) -> put(asn1_module,ModuleIdentifier), {_DefinitiveIdentifier,Rest02} = |