< prev index next >

src/hotspot/share/services/mallocTracker.hpp

Print this page
rev 47399 : [mq]: add_ptr

@@ -66,11 +66,11 @@
     assert(_size >= sz, "deallocation > allocated");
     Atomic::dec(&_count);
     if (sz > 0) {
       // unary minus operator applied to unsigned type, result still unsigned
       #pragma warning(suppress: 4146)
-      Atomic::add(-sz, &_size);
+      Atomic::sub(sz, &_size);
     }
   }
 
   inline void resize(long sz) {
     if (sz != 0) {
< prev index next >