From: Austin English Subject: ntdll: warn when RLIMIT_MEMLOCK is reached Message-Id: Date: Sun, 23 Mar 2014 15:36:31 -0700 For https://bugs.winehq.org/show_bug.cgi?id=14275 -- -Austin
For https://bugs.winehq.org/show_bug.cgi?id=14275

--
-Austin
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index e93ce2e..dab72cf 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -57,6 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(virtual); WINE_DECLARE_DEBUG_CHANNEL(module); +WINE_DECLARE_DEBUG_CHANNEL(winediag); #ifndef MS_SYNC #define MS_SYNC 0 @@ -2350,7 +2351,10 @@ NTSTATUS WINAPI NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *size, *size = ROUND_SIZE( *addr, *size ); *addr = ROUND_ADDR( *addr, page_mask ); - if (mlock( *addr, *size )) status = STATUS_ACCESS_DENIED; + if (mlock( *addr, *size )) + { + ERR_(winediag)( "Cannot allocate memory, ulimit -l may need to be increased.\n"); + } return status; }