diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-02-14 00:56:31 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-02-14 00:56:31 +0100 |
commit | dcc049e67d79c97838f83692fd5bdd2e361f4f1f (patch) | |
tree | e376c0fd39347e60d2129166fc902e58bea45c21 | |
parent | e38017f8ce131d8cffbd56ac3d2b5cba6091abe5 (diff) |
Print correct binary sizes
-rw-r--r-- | src/ahoy/emulator.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ahoy/emulator.c b/src/ahoy/emulator.c index 4ada357..34e31ad 100644 --- a/src/ahoy/emulator.c +++ b/src/ahoy/emulator.c @@ -76,8 +76,10 @@ emulate(struct u8view prog) { struct timespec tp; - if (prog.len > MEM_FREE) - diex("%s: binary of size %zu KiB too large to fit in RAM", "TODO", 0ul); + if (prog.len > MEM_FREE) { + diex("%s: binary of size %.1f KiB exceeds %d B maximum", "TODO", + (double)prog.len / 1024, MEM_FREE); + } PC = MEM_RESERVED; memcpy(mem + PC, prog.p, prog.len); |