Commit 8ed2e706 authored by Mark Mendell's avatar Mark Mendell
Browse files

Fix OOM test case to handle more optimizations



The 080-oom-throw test case has some code in triggerInstanceOOM to
exhaust memory.  Unfortunately, a sufficiently intelligent compiler can
inline the call to memEater.confuseCompilerOptimization and realize that
it is a no-op.  In that case, the memEater variable is dead, and if a
compiler can improve the GC map, the only live heap data will be the
last allocated chunk.

Fix this by ensuring that the start of the chain (memEater) is really
live. Also ensure that it becomes dead before exiting the method, or the
subsequent println will fail allocating memory.

Change-Id: I345ebc3e19bd86e176c616ff18bcac4ed8dbb419
Signed-off-by: default avatarMark Mendell <mark.p.mendell@intel.com>
parent 7df1754a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment