Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(910)

Unified Diff: src/pkg/runtime/mem_linux.c

Issue 6997049: code review 6997049: runtime/linux: die more gracefully when locked mem quot...
Patch Set: diff -r 1fd839e10187 https://code.google.com/p/go/ Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/mem_linux.c
===================================================================
--- a/src/pkg/runtime/mem_linux.c
+++ b/src/pkg/runtime/mem_linux.c
@@ -10,6 +10,7 @@
enum
{
+ EAGAIN = 11,
ENOMEM = 12,
_PAGE_SIZE = 4096,
};
@@ -63,6 +64,10 @@
runtime·printf("if you're running SELinux, enable execmem for this process.\n");
runtime·exit(2);
}
+ if(p == (void*)EAGAIN) {
+ runtime·printf("runtime: mmap: too much locked memory (check 'ulimit -l').\n");
+ runtime·exit(2);
+ }
return nil;
}
return p;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b