xo-arena: annex AllocInfo.*pp from xo-alloc2
This commit is contained in:
parent
0151c0ce4d
commit
e2cf88eb10
3 changed files with 1 additions and 143 deletions
|
|
@ -1,45 +0,0 @@
|
|||
/** @file AllocInfo.cpp
|
||||
*
|
||||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#include "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::payload() const noexcept -> span_type
|
||||
{
|
||||
if (!p_header_)
|
||||
return span_type(nullptr, nullptr);
|
||||
|
||||
byte * lo = (byte *)(p_header_ + 1);
|
||||
size_type z = this->size();
|
||||
|
||||
return span_type(lo, lo+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 */
|
||||
|
|
@ -4,7 +4,7 @@ set(SELF_LIB xo_alloc2)
|
|||
set(SELF_SRCS
|
||||
|
||||
# AllocError.cpp
|
||||
AllocInfo.cpp
|
||||
# AllocInfo.cpp
|
||||
cmpresult.cpp
|
||||
|
||||
AAllocator.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue