Message ID | 4FF73363.1080409@msgid.tls.msk.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/vl.c b/vl.c index 5d9fc55..db98a4a 100644 --- a/vl.c +++ b/vl.c @@ -2671,7 +2675,15 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "qemu: ram size too large\n"); exit(1); } - ram_size = value; +#define RAM_SIZE_GRANULARITY (8*1024) + ram_size = value / RAM_SIZE_GRANULARITY; + ram_size *= RAM_SIZE_GRANULARITY; + if (ram_size != value) { + fprintf(stderr, + "warning: requested memory size (%" PRIu64 " bytes) " + "truncated to %" PRIu64 " bytes\n", + value, (uint64_t)ram_size); + } break; } case QEMU_OPTION_mempath: