> On Mar 9, 2018, at 10:56 AM, Claes Redestad <claes.redes...@oracle.com> wrote: > > > > On 2018-03-09 19:31, Paul Sandoz wrote: >> 49 } catch (OutOfMemoryError e) { >> 50 // Can happen on some system configurations, and while >> increasing heap >> 51 // size would allow GC to keep up, it makes it >> impractically hard to >> 52 // reproduce NPE issues that could arise when references >> are being >> 53 // cleared. Do a System.gc() to try to reclaim enough >> memory to not >> 54 // throw an OOME again in the jtreg wrapper. >> 55 System.gc(); >> 56 } >> >> Since the test is run with main/othervm why bother with System.gc? > > If I don't the test still fails almost all the time with an OOME in whatever > jtreg > wrapper method is calling main. >
Ah, ok, even the thin shim. +1 Paul.