From a5c61bf479453e7e195888afb4e62a9872d6be7c Mon Sep 17 00:00:00 2001 From: Richard Uhler Date: Mon, 24 Oct 2016 15:54:44 +0100 Subject: Fall back to true anonymous mmap if out of file descriptors. MemMap::MapAnonymous needs a file descriptor to create an ashmem region to label otherwise anonymous mmaps for debugging purposes. If the process has no file descriptors available, fall back to traditional anonymous mmap rather than failing. Test: m test-art-host, m test-art-target Bug: 32013594 Bug: 32302133 Change-Id: I6b2c770fc031eb8d429407f3a0e7408c52cb1985 --- test/151-OpenFileLimit/src/Main.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/151-OpenFileLimit/src/Main.java') diff --git a/test/151-OpenFileLimit/src/Main.java b/test/151-OpenFileLimit/src/Main.java index 01a9a4ed34..9fe47c8b16 100644 --- a/test/151-OpenFileLimit/src/Main.java +++ b/test/151-OpenFileLimit/src/Main.java @@ -52,11 +52,7 @@ public class Main { thread.start(); thread.join(); } catch (Throwable e) { - if (e.getMessage().contains("Too many open files")) { - System.out.println("Message includes \"Too many open files\""); - } else { - System.out.println(e.getMessage()); - } + System.out.println(e.getMessage()); } for (int i = 0; i < files.size(); i++) { -- cgit v1.2.3-59-g8ed1b