comparison src/share/vm/gc_implementation/shared/mutableNUMASpace.cpp @ 1571:2d127394260e

6916623: Align object to 16 bytes to use Compressed Oops with java heap up to 64Gb Summary: Added new product ObjectAlignmentInBytes flag to control object alignment. Reviewed-by: twisti, ysr, iveresov
author kvn
date Thu, 27 May 2010 18:01:56 -0700
parents 7bb995fbd3c0
children e9ff18c4ace7
comparison
equal deleted inserted replaced
1570:de91a2f25c7e 1571:2d127394260e
759 MutableSpace *s = ls->space(); 759 MutableSpace *s = ls->space();
760 HeapWord *p = s->allocate(size); 760 HeapWord *p = s->allocate(size);
761 761
762 if (p != NULL) { 762 if (p != NULL) {
763 size_t remainder = s->free_in_words(); 763 size_t remainder = s->free_in_words();
764 if (remainder < (size_t)oopDesc::header_size() && remainder > 0) { 764 if (remainder < CollectedHeap::min_fill_size() && remainder > 0) {
765 s->set_top(s->top() - size); 765 s->set_top(s->top() - size);
766 p = NULL; 766 p = NULL;
767 } 767 }
768 } 768 }
769 if (p != NULL) { 769 if (p != NULL) {
801 LGRPSpace *ls = lgrp_spaces()->at(i); 801 LGRPSpace *ls = lgrp_spaces()->at(i);
802 MutableSpace *s = ls->space(); 802 MutableSpace *s = ls->space();
803 HeapWord *p = s->cas_allocate(size); 803 HeapWord *p = s->cas_allocate(size);
804 if (p != NULL) { 804 if (p != NULL) {
805 size_t remainder = pointer_delta(s->end(), p + size); 805 size_t remainder = pointer_delta(s->end(), p + size);
806 if (remainder < (size_t)oopDesc::header_size() && remainder > 0) { 806 if (remainder < CollectedHeap::min_fill_size() && remainder > 0) {
807 if (s->cas_deallocate(p, size)) { 807 if (s->cas_deallocate(p, size)) {
808 // We were the last to allocate and created a fragment less than 808 // We were the last to allocate and created a fragment less than
809 // a minimal object. 809 // a minimal object.
810 p = NULL; 810 p = NULL;
811 } else { 811 } else {