mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-20 13:03:50 +00:00
* Seal the heap: bounded library heaps and zero-allocation program tests The programs point libuv, c-ares and Mbed TLS (MBEDTLS_PLATFORM_MEMORY in the bundled build) at their own FixedHeap before anything runs, mark the end of startup with heap_seal(), and in verbose mode report heap use and any allocation after it at exit. The library build keeps the host's allocator. measure_alloc.py gains --udp, and the alloc_steady_programs_* tests now fail on any malloc per relayed TCP connection (by name and by address) or UDP association, for every cipher family. * Fix GCC -Wsign-compare errors in the converted C modules GCC enables -Wsign-compare with -Wall for C++ (clang does not), which turned a few signed/unsigned comparisons in base64, netutils, server and manager into errors; udp.cpp needed <ctime>. * Add --max-connections and --max-udp-sessions The TCP connection pool and the UDP session table are sized from these options (or max_connections / max_udp_sessions in the configuration file) at startup instead of fixed constants; the DNS query pool follows the connection limit. test_limits.py checks that a connection beyond the limit is refused and that accepting resumes once one closes.