@@ -506,15 +506,15 @@ class RegionAllocatorResource
506506
507507 if (mCanFail && !lRet) {
508508 WDDLOG_GRL (10000 , " RegionAllocatorResource: Allocation failed. region={} alloc={} region_size={} free={}" ,
509- mSegmentName , pSize, mRegion ->GetSize (), mFree );
509+ mSegmentName , pSize, mRegion ->GetSize (), mFree . load () );
510510 WDDLOG_GRL (10000 , " Memory region '{}' is too small, or there is a large backpressure." , mSegmentName );
511511 return nullptr ;
512512 }
513513
514514 while (true ) {
515515 using namespace std ::chrono_literals;
516516 WDDLOG_RL (1000 , " RegionAllocatorResource: waiting to allocate a message. region={} alloc={} region_size={} free={}" ,
517- mSegmentName , pSize, mRegion ->GetSize (), mFree );
517+ mSegmentName , pSize, mRegion ->GetSize (), mFree . load () );
518518 WDDLOG_RL (1000 , " Memory region '{}' is too small, or there is a large backpressure." , mSegmentName );
519519 if (lGen != mGeneration .load ()) {
520520 break ; // retry alloc
@@ -533,7 +533,7 @@ class RegionAllocatorResource
533533 mFree -= pSizeUp;
534534 assert (mFree >= 0 );
535535
536- DDDLOG_GRL (5000 , " DataRegionResource {} memory free={} allocated={}" , mSegmentName , mFree , (mSegmentSize - mFree ));
536+ DDDLOG_GRL (5000 , " DataRegionResource {} memory free={} allocated={}" , mSegmentName , mFree . load () , (mSegmentSize - mFree . load () ));
537537
538538 // If the allocated message was aligned up, set a first byte after the buffer to 0
539539 if (pSizeUp > pSize) {
@@ -584,7 +584,7 @@ class RegionAllocatorResource
584584
585585 if (mFreeRanges .empty ()) {
586586 if (mFree != 0 ) {
587- EDDLOG_GRL (1000 , " DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}" , mSegmentName , pSize, mFree );
587+ EDDLOG_GRL (1000 , " DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}" , mSegmentName , pSize, mFree . load () );
588588 }
589589 return false ;
590590 }
0 commit comments