@@ -168,7 +168,7 @@ size_t MutableNUMASpace::free_in_words() const {
168
168
169
169
170
170
size_t MutableNUMASpace::tlab_capacity (Thread *thr) const {
171
- guarantee (thr != NULL , " No thread" );
171
+ guarantee (thr != nullptr , " No thread" );
172
172
int lgrp_id = thr->lgrp_id ();
173
173
if (lgrp_id == -1 ) {
174
174
// This case can occur after the topology of the system has
@@ -193,7 +193,7 @@ size_t MutableNUMASpace::tlab_capacity(Thread *thr) const {
193
193
194
194
size_t MutableNUMASpace::tlab_used (Thread *thr) const {
195
195
// Please see the comments for tlab_capacity().
196
- guarantee (thr != NULL , " No thread" );
196
+ guarantee (thr != nullptr , " No thread" );
197
197
int lgrp_id = thr->lgrp_id ();
198
198
if (lgrp_id == -1 ) {
199
199
if (lgrp_spaces ()->length () > 0 ) {
@@ -213,7 +213,7 @@ size_t MutableNUMASpace::tlab_used(Thread *thr) const {
213
213
214
214
size_t MutableNUMASpace::unsafe_max_tlab_alloc (Thread *thr) const {
215
215
// Please see the comments for tlab_capacity().
216
- guarantee (thr != NULL , " No thread" );
216
+ guarantee (thr != nullptr , " No thread" );
217
217
int lgrp_id = thr->lgrp_id ();
218
218
if (lgrp_id == -1 ) {
219
219
if (lgrp_spaces ()->length () > 0 ) {
@@ -587,8 +587,8 @@ void MutableNUMASpace::initialize(MemRegion mr,
587
587
if (!old_region.equals (region ())) {
588
588
new_region = MemRegion (rounded_bottom, rounded_end);
589
589
MemRegion intersection = new_region.intersection (old_region);
590
- if (intersection.start () == NULL ||
591
- intersection.end () == NULL ||
590
+ if (intersection.start () == nullptr ||
591
+ intersection.end () == nullptr ||
592
592
prev_page_size > page_size ()) { // If the page size got smaller we have to change
593
593
// the page size preference for the whole space.
594
594
intersection = MemRegion (new_region.start (), new_region.start ());
@@ -663,7 +663,7 @@ void MutableNUMASpace::initialize(MemRegion mr,
663
663
664
664
MemRegion intersection = old_region.intersection (new_region);
665
665
666
- if (intersection.start () == NULL || intersection.end () == NULL ) {
666
+ if (intersection.start () == nullptr || intersection.end () == nullptr ) {
667
667
intersection = MemRegion (new_region.start (), new_region.start ());
668
668
}
669
669
@@ -783,19 +783,19 @@ HeapWord* MutableNUMASpace::cas_allocate(size_t size) {
783
783
LGRPSpace *ls = lgrp_spaces ()->at (i);
784
784
MutableSpace *s = ls->space ();
785
785
HeapWord *p = s->cas_allocate (size);
786
- if (p != NULL ) {
786
+ if (p != nullptr ) {
787
787
size_t remainder = pointer_delta (s->end (), p + size);
788
788
if (remainder < CollectedHeap::min_fill_size () && remainder > 0 ) {
789
789
if (s->cas_deallocate (p, size)) {
790
790
// We were the last to allocate and created a fragment less than
791
791
// a minimal object.
792
- p = NULL ;
792
+ p = nullptr ;
793
793
} else {
794
794
guarantee (false , " Deallocation should always succeed" );
795
795
}
796
796
}
797
797
}
798
- if (p != NULL ) {
798
+ if (p != nullptr ) {
799
799
HeapWord* cur_top, *cur_chunk_top = p + size;
800
800
while ((cur_top = top ()) < cur_chunk_top) { // Keep _top updated.
801
801
if (Atomic::cmpxchg (top_addr (), cur_top, cur_chunk_top) == cur_top) {
@@ -805,12 +805,12 @@ HeapWord* MutableNUMASpace::cas_allocate(size_t size) {
805
805
}
806
806
807
807
// Make the page allocation happen here if there is no static binding.
808
- if (p != NULL && !os::numa_has_static_binding () ) {
808
+ if (p != nullptr && !os::numa_has_static_binding () ) {
809
809
for (HeapWord *i = p; i < p + size; i += os::vm_page_size () >> LogHeapWordSize) {
810
810
*(int *)i = 0 ;
811
811
}
812
812
}
813
- if (p == NULL ) {
813
+ if (p == nullptr ) {
814
814
ls->set_allocation_failed ();
815
815
}
816
816
return p;
@@ -911,7 +911,7 @@ void MutableNUMASpace::LGRPSpace::scan_pages(size_t page_size, size_t page_count
911
911
char *s = scan_start;
912
912
while (s < scan_end) {
913
913
char *e = os::scan_pages (s, (char *)scan_end, &page_expected, &page_found);
914
- if (e == NULL ) {
914
+ if (e == nullptr ) {
915
915
break ;
916
916
}
917
917
if (e != scan_end) {
0 commit comments