Mercurial > hg > truffle
changeset 8809:e7081eb7e786
Merge
author | dcubed |
---|---|
date | Wed, 20 Mar 2013 20:52:00 -0700 |
parents | 81d1b58c078f (diff) 1feda2e9f044 (current diff) |
children | 0ac03fef364f |
files | |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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); }