FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
runtime/linux: die more gracefully when locked mem quota is overrun.

Used to then die on a nil pointer situation. Most Linux standard setups
are rather restrictive regarding the default amount of lockable memory.

Please review this at https://codereview.appspot.com/6997049/

Affected files:
M src/pkg/runtime/mem_linux.c


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
rlimits).\n");
+ runtime·exit(2);
+ }
return nil;
}
return p;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 23, '12 at 10:16a
activeDec 30, '12 at 9:49a
posts8
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase