From 947576363e49dcfa26922ca87a13ee2d6483394f Mon Sep 17 00:00:00 2001 From: Mehmet Cambaz <52370708+MehmetCambaz@users.noreply.github.com> Date: Sat, 29 Aug 2026 15:20:36 +0300 Subject: [PATCH] kernel: explain a commit-limit failure at startup (#395) When CreateFileMapping cannot reserve the guest backing store the log only carries the raw Win32 error, which gives no clue that the paging file is the thing to change. Print the size that was asked for and say so directly when the failure is ERROR_NO_SYSTEM_RESOURCES or ERROR_COMMITMENT_LIMIT. --- src/kernel/memoryAddressSpace.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/kernel/memoryAddressSpace.inc b/src/kernel/memoryAddressSpace.inc index 25a3606a..17510688 100644 --- a/src/kernel/memoryAddressSpace.inc +++ b/src/kernel/memoryAddressSpace.inc @@ -659,7 +659,16 @@ public: #endif ReserveGuestRegions(); m_backing = new GuestBackingStore(backing_size); - EXIT_IF(!m_backing->IsAvailable()); + if (!m_backing->IsAvailable()) { +#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS + EXIT("could not reserve %" PRIu64 " MB for guest direct memory. Windows commits\n" + "this up front, so the paging file is usually what needs to be larger.\n", + backing_size / (1024U * 1024U)); +#else + EXIT("could not reserve %" PRIu64 " MB for guest direct memory\n", + backing_size / (1024U * 1024U)); +#endif + } } ~GuestAddressSpace() {