src/hotspot/share/gc/parallel/mutableNUMASpace.cpp
changeset 47634 6a0c42c40cd1
parent 47216 71c04702a3d5
child 48105 8d15b1369c7a
equal deleted inserted replaced
47633:1c21c60f51bf 47634:6a0c42c40cd1
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   860     }
   860     }
   861   }
   861   }
   862   if (p != NULL) {
   862   if (p != NULL) {
   863     HeapWord* cur_top, *cur_chunk_top = p + size;
   863     HeapWord* cur_top, *cur_chunk_top = p + size;
   864     while ((cur_top = top()) < cur_chunk_top) { // Keep _top updated.
   864     while ((cur_top = top()) < cur_chunk_top) { // Keep _top updated.
   865       if (Atomic::cmpxchg_ptr(cur_chunk_top, top_addr(), cur_top) == cur_top) {
   865       if (Atomic::cmpxchg(cur_chunk_top, top_addr(), cur_top) == cur_top) {
   866         break;
   866         break;
   867       }
   867       }
   868     }
   868     }
   869   }
   869   }
   870 
   870