File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
#include " aligned_page_pool.h"
2
2
#include " util/string/builder.h"
3
- #include < contrib/ydb/library/actors/util/intrinsics.h>
4
3
5
4
#include < util/generic/yexception.h>
6
5
#include < util/string/cast.h>
@@ -49,15 +48,15 @@ class TGlobalPagePool {
49
48
void * GetPage () {
50
49
void *page = nullptr ;
51
50
if (Pages.Dequeue (&page)) {
52
- AtomicDecrement ( Count) ;
51
+ -- Count;
53
52
return page;
54
53
}
55
54
56
55
return nullptr ;
57
56
}
58
57
59
58
ui64 GetPageCount () const {
60
- return RelaxedLoad (& Count);
59
+ return Count. load (std::memory_order_relaxed );
61
60
}
62
61
63
62
size_t GetPageSize () const {
@@ -75,7 +74,7 @@ class TGlobalPagePool {
75
74
FreePage (addr);
76
75
return GetPageSize ();
77
76
#else
78
- AtomicIncrement ( Count) ;
77
+ ++ Count;
79
78
Pages.Enqueue (addr);
80
79
return 0 ;
81
80
#endif
@@ -88,7 +87,7 @@ class TGlobalPagePool {
88
87
89
88
private:
90
89
const size_t PageSize;
91
- TAtomic Count = 0 ;
90
+ std::atomic<ui64> Count = 0 ;
92
91
TLockFreeStack<void *> Pages;
93
92
};
94
93
Original file line number Diff line number Diff line change 55
55
PEERDIR(
56
56
contrib/libs/apache/arrow
57
57
contrib/libs/cctz/tzdata
58
- contrib/ydb/library/actors/util
59
58
library/cpp/deprecated/enum_codegen
60
59
library/cpp/enumbitset
61
60
library/cpp/monlib/dynamic_counters
You can’t perform that action at this time.
0 commit comments