Mercurial > hg > truffle
comparison src/share/vm/runtime/os.cpp @ 6985:80e866b1d053
Merge
author | coleenp |
---|---|
date | Fri, 16 Nov 2012 09:19:12 -0500 |
parents | 6cb0d32b828b e4f764ddb06a |
children | 2cb439954abf f34d701e952e |
comparison
equal
deleted
inserted
replaced
6974:6b6ddf8c4329 | 6985:80e866b1d053 |
---|---|
580 if (size == 0) { | 580 if (size == 0) { |
581 // return a valid pointer if size is zero | 581 // return a valid pointer if size is zero |
582 // if NULL is returned the calling functions assume out of memory. | 582 // if NULL is returned the calling functions assume out of memory. |
583 size = 1; | 583 size = 1; |
584 } | 584 } |
585 | 585 if (size > size + space_before + space_after) { // Check for rollover. |
586 return NULL; | |
587 } | |
586 NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap()); | 588 NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap()); |
587 u_char* ptr = (u_char*)::malloc(size + space_before + space_after); | 589 u_char* ptr = (u_char*)::malloc(size + space_before + space_after); |
588 | 590 |
589 #ifdef ASSERT | 591 #ifdef ASSERT |
590 if (ptr == NULL) return NULL; | 592 if (ptr == NULL) return NULL; |