xo-alloc2: refactor: + AllocInfo.cpp
This commit is contained in:
parent
5a5de795c1
commit
7cd7b6dfdb
3 changed files with 38 additions and 16 deletions
34
xo-alloc2/src/alloc2/AllocInfo.cpp
Normal file
34
xo-alloc2/src/alloc2/AllocInfo.cpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/** @file AllocInfo.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#include "alloc/AllocInfo.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
|
||||
auto
|
||||
AllocInfo::guard_lo() const noexcept -> span_type
|
||||
{
|
||||
if (!p_guard_lo_)
|
||||
return span_type(nullptr, nullptr);
|
||||
|
||||
return span_type(p_guard_lo_,
|
||||
p_guard_lo_ + p_config_->guard_z_);
|
||||
}
|
||||
|
||||
auto
|
||||
AllocInfo::guard_hi() const noexcept -> span_type
|
||||
{
|
||||
if (!p_guard_hi_)
|
||||
return span_type(nullptr, nullptr);
|
||||
|
||||
return span_type(p_guard_hi_,
|
||||
p_guard_hi_ + p_config_->guard_z_);
|
||||
}
|
||||
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end AllocInfo.cpp */
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
set(SELF_LIB xo_alloc2)
|
||||
set(SELF_SRCS
|
||||
|
||||
AllocInfo.cpp
|
||||
|
||||
AAllocator.cpp
|
||||
DArena.cpp
|
||||
IAllocator_Any.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue