Skip to content

Commit

Permalink
Merge pull request #1513 from evoskuil/master
Browse files Browse the repository at this point in the history
Use BC_API, make retainer and default_arena final.
  • Loading branch information
evoskuil authored Aug 1, 2024
2 parents 8d06d32 + d84fb96 commit e6cbbfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/bitcoin/system/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ class allocator
}

private:
// This is thread safe.
arena* arena_;
};

Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/system/arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bool operator==(const arena& left, const arena& right) NOEXCEPT;
/// quuxplusone.github.io/blog/2023/06/02/not-so-quick-pmr
/// quuxplusone.github.io/blog/2023/06/03/p1144-pmr-koans
/// ***************************************************************************
class default_arena
class BC_API default_arena final
: public arena
{
public:
Expand Down
3 changes: 2 additions & 1 deletion include/bitcoin/system/retainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace libbitcoin {

/// Shared lock object to inform allocator that memory may be freed.
class retainer
class BC_API retainer final
{
public:
using ptr = std::shared_ptr<retainer>;
Expand All @@ -46,6 +46,7 @@ class retainer
BC_POP_WARNING()

private:
// This is thread safe.
std::shared_lock<std::shared_mutex> shared_lock_;
};

Expand Down

0 comments on commit e6cbbfc

Please sign in to comment.