Pulp
1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
scoped_no_alloc.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
pulp::runtime
{
4
27
class
ScopedNoAlloc
{
28
public
:
29
// The ctor/dtor symbols are ALWAYS defined out-of-line so the
30
// ABI is identical whether Pulp was compiled with NDEBUG or not.
31
// Previously the header was guarded with `#ifdef NDEBUG` and the
32
// .cpp body was compiled out under NDEBUG, which broke any
33
// mixed-mode link (Release SDK + Debug downstream plugin emitted
34
// calls to symbols the Release archive didn't ship). The body of
35
// each ctor/dtor is conditional on NDEBUG inside scoped_no_alloc.cpp
36
// — the symbol exists in both modes but does nothing in Release.
37
ScopedNoAlloc
() noexcept;
38
~
ScopedNoAlloc
() noexcept;
39
40
ScopedNoAlloc
(const
ScopedNoAlloc
&) = delete;
41
ScopedNoAlloc
& operator=(const
ScopedNoAlloc
&) = delete;
42
ScopedNoAlloc
(
ScopedNoAlloc
&&) = delete;
43
ScopedNoAlloc
& operator=(
ScopedNoAlloc
&&) = delete;
44
};
45
63
class
ScopedAllocAllowed
{
64
public
:
65
ScopedAllocAllowed
() noexcept;
66
~
ScopedAllocAllowed
() noexcept;
67
68
ScopedAllocAllowed
(const
ScopedAllocAllowed
&) = delete;
69
ScopedAllocAllowed
& operator=(const
ScopedAllocAllowed
&) = delete;
70
ScopedAllocAllowed
(
ScopedAllocAllowed
&&) = delete;
71
ScopedAllocAllowed
& operator=(
ScopedAllocAllowed
&&) = delete;
72
};
73
77
bool
is_in_no_alloc_scope
() noexcept;
78
83
int
no_alloc_scope_depth
() noexcept;
84
87
int
no_alloc_allowed_depth
() noexcept;
88
89
}
// namespace pulp::runtime
pulp::runtime::ScopedAllocAllowed::ScopedAllocAllowed
ScopedAllocAllowed() noexcept
pulp::runtime::ScopedNoAlloc::ScopedNoAlloc
ScopedNoAlloc() noexcept
pulp::runtime
Definition
generated_event_source.hpp:33
pulp::runtime::no_alloc_scope_depth
int no_alloc_scope_depth() noexcept
Depth of nested ScopedNoAlloc instances on the current thread.
pulp::runtime::is_in_no_alloc_scope
bool is_in_no_alloc_scope() noexcept
pulp::runtime::no_alloc_allowed_depth
int no_alloc_allowed_depth() noexcept
Depth of nested ScopedAllocAllowed instances on the current thread.
core
runtime
include
pulp
runtime
scoped_no_alloc.hpp
Generated by
1.15.0