--- old/src/share/vm/utilities/bitMap.cpp 2014-03-28 13:34:18.365026642 +0100 +++ new/src/share/vm/utilities/bitMap.cpp 2014-03-28 13:34:18.249021927 +0100 @@ -582,9 +582,20 @@ } static void testResizeNonResource() { + const uintx bitmap_bytes = BITMAP_SIZE / BitsPerByte; + + // Test the default behavior testResize(false); + + { + // Make sure that AllocatorMallocLimit is larger than our allocation request + // forcing it to call standard malloc() + UIntFlagSetting fs(ArrayAllocatorMallocLimit, bitmap_bytes * 4); + testResize(false); + } { - uintx bitmap_bytes = BITMAP_SIZE / BitsPerByte; + // Make sure that AllocatorMallocLimit is smaller than our allocation request + // forcing it to call mmap() (or equivalent) UIntFlagSetting fs(ArrayAllocatorMallocLimit, bitmap_bytes / 4); testResize(false); }