src/ex/frame_allocator.cpp

100.0% Lines (2 / 2) 100.0% Functions (1 / 1)
frame_allocator.cpp
f(x) Functions (1)
Line TLA Hits Source Code
1 //
2 // Copyright (c) 2026 Steve Gerbino
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/cppalliance/capy
8 //
9
10 #include <boost/capy/ex/frame_allocator.hpp>
11
12 #if (defined(BOOST_CAPY_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
13 !defined(BOOST_CAPY_STATIC_LINK)
14
15 namespace boost {
16 namespace capy {
17 namespace detail {
18
19 std::pmr::memory_resource*&
20 852070x current_frame_allocator_ref() noexcept
21 {
22 static thread_local std::pmr::memory_resource* mr = nullptr;
23 852070x return mr;
24 }
25
26 } // namespace detail
27 } // namespace capy
28 } // namespace boost
29
30 #endif
31