YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
stack_allocator.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4
5namespace yaclib::detail::fiber {
6
8 char* start = nullptr;
9 std::size_t size = 0;
10};
11
12/**
13 * Passed to coroutine/fiber constructor, specifies the way in which
14 * memory for Stack is Allocated and Released
15 * \see Stack
16 */
18 public:
19 [[nodiscard]] virtual Allocation Allocate() = 0;
20
21 virtual void Release(Allocation) = 0;
22
23 virtual void SetMinStackSize(std::size_t bytes) = 0;
24
25 virtual std::size_t GetMinStackSize() = 0;
26
27 virtual ~IStackAllocator() = default;
28};
29
30} // namespace yaclib::detail::fiber
Passed to coroutine/fiber constructor, specifies the way in which memory for Stack is Allocated and R...
virtual std::size_t GetMinStackSize()=0
virtual void Release(Allocation)=0
virtual void SetMinStackSize(std::size_t bytes)=0
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25