Module Name: src Committed By: rillig Date: Sat Nov 21 17:44:40 UTC 2020
Modified Files: src/usr.bin/make/unit-tests: Makefile Log Message: make(1): limit memory usage in tests There is a suspicious condition in SuffUpdateTarget code that looks wrong on the first sight. When removing it though, make allocates huge amounts of memory. To stop freezing the whole machine in this situation, limit the total memory. The limit of 200000 has been determined experimentally on NetBSD 8.0 x86_64. With a limit of 100000, make wouldn't even start. 100 MB of memory is really a lot for such a simple program that according to top(1) only needs 8 MB. But 200 MB is still better than 5 GB. Since the Makefile is used on other platforms as well, via the bmake distribution, and since every operating system has its own list of ulimit options, make this configurable. To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/usr.bin/make/unit-tests/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.