3 #include <libcopp/utils/config/libcopp_build_features.h>
15 # include <sys/resource.h>
16 # include <sys/time.h>
26 # if !defined(MINSIGSTKSZ)
27 # define MINSIGSTKSZ (128 * 1024)
28 # define UDEF_MINSIGSTKSZ
31 # ifdef COPP_HAS_ABI_HEADERS
32 # include COPP_ABI_PREFIX
38 LIBCOPP_COPP_NAMESPACE_BEGIN
42 std::size_t
size = ::sysconf(_SC_PAGESIZE);
49 ::getrlimit(RLIMIT_STACK, &limit);
76 if (
is_unbounded())
return std::numeric_limits<std::size_t>::max();
84 LIBCOPP_COPP_NAMESPACE_END
86 # ifdef COPP_HAS_ABI_HEADERS
87 # include COPP_ABI_SUFFIX
90 # ifdef UDEF_MINSIGSTKSZ
static rlimit stacksize_limit()
static rlimit stacksize_limit_()
static std::size_t pagesize()
constexpr auto size(TCONTAINER &&container) -> decltype(container.size())
static LIBCOPP_COPP_API std::size_t default_size() LIBCOPP_MACRO_NOEXCEPT
static LIBCOPP_COPP_API std::size_t page_size() LIBCOPP_MACRO_NOEXCEPT
static LIBCOPP_COPP_API std::size_t maximum_size() LIBCOPP_MACRO_NOEXCEPT
static LIBCOPP_COPP_API std::size_t round_to_page_size(std::size_t stacksize) LIBCOPP_MACRO_NOEXCEPT
static LIBCOPP_COPP_API std::size_t minimum_size() LIBCOPP_MACRO_NOEXCEPT
static LIBCOPP_COPP_API bool is_unbounded() LIBCOPP_MACRO_NOEXCEPT