Replies: 2 comments
-
|
Yep, that makes sense. One complementary is to add an assertion after the size is calculated and before the memory is allocated, so the program will panic if it's too big: "the cache is never more than 1GB" or whatever. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
On Sat, 24 Jan 2026 09:39:44 -0800 Martin Pool ***@***.***> wrote:
Yep, that makes sense.
One complementary is to add an assertion after the size is calculated
and before the memory is allocated, so the program will panic if it's
too big: "the cache is never more than 1GB" or whatever.
I am thinking like sampling the memory usage for the baseline test run
and using that for mutation runs (multiplied with a
configureable factor, like *2.0 because sometimes test/failures may
create huge debug data). But I explicitly left the implementation of
this open. There are certainly enough other ways and considerations to
do (portability).
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Not actually about the RAM prices ;)
I have the situation that some mutations creating memory leaks (replacing - with + etc). This should be expected and normal in mutation testing. Such test should be just aborted before the OOM kills the test. Currently I fix this with a reasonable 'ulimit' for the shell running cargo mutants. The unintentional consequence here is that the whole mutation/build process is memory constrained which means I have to give it more memory than necessary not to kill the build. Ideally one should be able to limit the memory of the actual test run only.
Beta Was this translation helpful? Give feedback.
All reactions