diff options
author | June McEnroe <june@causal.agency> | 2020-12-14 01:27:02 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-14 01:27:02 -0500 |
commit | 5fed2fdcf74ae94cc61a3c188d85631ce6182ef9 (patch) | |
tree | 57c4864074dd2b3dcf53415122bfa98eb3ed0dd4 /2020 | |
parent | Solve day 14 part 2 (diff) | |
download | aoc-5fed2fdcf74ae94cc61a3c188d85631ce6182ef9.tar.gz aoc-5fed2fdcf74ae94cc61a3c188d85631ce6182ef9.zip |
"Allocate" only 4 MB rather than 1 TB for day 14 part 2
There are <512 writes in the input data, and at most 9 bits floating. Doesn't really matter much, though.
Diffstat (limited to '2020')
-rw-r--r-- | 2020/day14.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/2020/day14.c b/2020/day14.c index a40bb3f..638ca35 100644 --- a/2020/day14.c +++ b/2020/day14.c @@ -16,7 +16,7 @@ static void write(ul addr, ul val) { writes[len].addr = addr; writes[len++].val = val; } -static struct Write writes2[0xFFFFFFFFF]; +static struct Write writes2[512 * (1 << 9)]; static ul len2; static void write2(ul addr, ul val) { for (int i = 0; i < len2; ++i) { |