# HG changeset patch # User dcubed # Date 1363837920 25200 # Node ID e7081eb7e786206c9195edf2fc9f6399ab3f6443 # Parent 81d1b58c078f657b1d22ec9cde920be24e0a9c8d# Parent 1feda2e9f044db5d218aa3a1b762d8812de0ee28 Merge diff -r 1feda2e9f044 -r e7081eb7e786 src/share/vm/runtime/os.cpp --- a/src/share/vm/runtime/os.cpp Wed Mar 20 20:40:57 2013 +0100 +++ b/src/share/vm/runtime/os.cpp Wed Mar 20 20:52:00 2013 -0700 @@ -577,15 +577,15 @@ // condition without really running the system out of memory. // static u_char* testMalloc(size_t alloc_size) { + assert(MallocMaxTestWords > 0, "sanity check"); - if (MallocMaxTestWords > 0 && - (cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) { + if ((cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) { return NULL; } u_char* ptr = (u_char*)::malloc(alloc_size); - if (MallocMaxTestWords > 0 && (ptr != NULL)) { + if (ptr != NULL) { Atomic::add(((jint) (alloc_size / BytesPerWord)), (volatile jint *) &cur_malloc_words); }