mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-03 16:45:53 +00:00
Parse the config file on arenas
read_jconf now reads the file and builds the JSON tree in a scratch arena that is released before it returns, and copies the parsed strings into one process-lifetime arena instead of a malloc per string. parse_addr and the config parser share one address splitter. Port test_jconf to C++ and cover every field copied out of the parse tree, a re-read, and the densest file the size limit accepts.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# violations, and also when it loses some, so the number here always goes
|
||||
# down. Remove a file once it is rewritten on the src/core primitives.
|
||||
src/ipset.cpp 3
|
||||
src/jconf.cpp 16
|
||||
src/jconf.cpp 6
|
||||
src/json.cpp 2
|
||||
src/local.cpp 1
|
||||
src/manager.cpp 14
|
||||
|
||||
Reference in New Issue
Block a user