Allow to disable memory limit at compilation time

This commit is contained in:
Guillaume J. Charmes
2013-04-12 10:48:20 -07:00
parent b1fbebb4a3
commit 1967c8342a
5 changed files with 32 additions and 3 deletions
+2
View File
@@ -48,6 +48,8 @@ func layerArchive(tarfile string) (io.Reader, error) {
}
func init() {
NO_MEMORY_LIMIT = os.Getenv("NO_MEMORY_LIMIT") == "1"
// Hack to run sys init during unit testing
if SelfPath() == "/sbin/init" {
SysInit()