0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00
construct/include/ircd/ctx/stack.h
2020-10-14 02:22:45 -07:00

30 lines
995 B
C++

// The Construct
//
// Copyright (C) The Construct Developers, Authors & Contributors
// Copyright (C) 2016-2020 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
namespace ircd::ctx
{
struct stack;
}
struct ircd::ctx::stack
{
struct allocator;
mutable_buffer buf; // complete allocation
uintptr_t base {0}; // base frame pointer
size_t max {0}; // User given stack size
size_t at {0}; // Updated for profiling at sleep
size_t peak {0}; // Updated for profiling; maximum
stack(const mutable_buffer &) noexcept;
static const stack &get(const ctx &) noexcept;
static stack &get(ctx &) noexcept;
};