src/share/vm/runtime/os.cpp

changeset 4277
e4f764ddb06a
parent 4193
716c64bda5ba
child 4280
80e866b1d053
     1.1 --- a/src/share/vm/runtime/os.cpp	Fri Nov 09 22:22:53 2012 -0800
     1.2 +++ b/src/share/vm/runtime/os.cpp	Mon Nov 12 15:58:11 2012 -0500
     1.3 @@ -576,7 +576,9 @@
     1.4      // if NULL is returned the calling functions assume out of memory.
     1.5      size = 1;
     1.6    }
     1.7 -
     1.8 +  if (size > size + space_before + space_after) { // Check for rollover.
     1.9 +    return NULL;
    1.10 +  }
    1.11    NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
    1.12    u_char* ptr = (u_char*)::malloc(size + space_before + space_after);
    1.13  

mercurial