cs: fix phantom bytes effect on maximum-memory-bytes

original commit: 78f2c1e3ee1329f44742a23c28a76538eef8cbdd
This commit is contained in:
Matthew Flatt 2020-04-22 16:30:47 -06:00
parent f53f20b5b9
commit d755dbc00f

View File

@ -439,7 +439,7 @@ void S_resetmaxmembytes(void) {
} }
void S_adjustmembytes(iptr amt) { void S_adjustmembytes(iptr amt) {
if ((membytes += amt) < maxmembytes) maxmembytes = membytes; if ((membytes += amt) > maxmembytes) maxmembytes = membytes;
} }
static void expand_segment_table(uptr base, uptr end, seginfo *si) { static void expand_segment_table(uptr base, uptr end, seginfo *si) {