xo-alloc2: ++ documentation + threshold size for THP feature
This commit is contained in:
parent
3bd5fe699f
commit
5465235b13
21 changed files with 645 additions and 194 deletions
|
|
@ -18,10 +18,18 @@ namespace xo {
|
|||
*
|
||||
**/
|
||||
struct AllocInfo {
|
||||
/** @defgroup mm-allocinfo-traits **/
|
||||
///@{
|
||||
|
||||
using size_type = AllocHeader::size_type;
|
||||
using byte = std::byte;
|
||||
using span_type = std::pair<const byte *, const byte *>;
|
||||
|
||||
///@}
|
||||
|
||||
/** @defgroup mm-allocinfo-ctors **/
|
||||
///@{
|
||||
|
||||
AllocInfo(const AllocHeaderConfig * p_cfg,
|
||||
const byte * p_guard_lo,
|
||||
const AllocHeader * p_hdr,
|
||||
|
|
@ -39,6 +47,11 @@ namespace xo {
|
|||
return AllocInfo(p_cfg, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
///@}
|
||||
|
||||
/** @defgroup mm-allocinfo-methods **/
|
||||
///@{
|
||||
|
||||
/** true for non-sentinel AllocInfo instance **/
|
||||
bool is_valid() const { return (p_config_ != nullptr) && (p_header_ != nullptr); }
|
||||
|
||||
|
|
@ -59,10 +72,17 @@ namespace xo {
|
|||
/** Value (fixed test pattern) of guard byte **/
|
||||
char guard_byte() const noexcept { return p_config_->guard_byte_; }
|
||||
|
||||
///@}
|
||||
|
||||
/** @defgroup mm-allocinfo-instance-vars **/
|
||||
///@{
|
||||
|
||||
const AllocHeaderConfig * p_config_ = nullptr;
|
||||
const byte * p_guard_lo_ = nullptr;
|
||||
const AllocHeader * p_header_ = nullptr;
|
||||
const byte * p_guard_hi_ = nullptr;
|
||||
|
||||
///@}
|
||||
};
|
||||
} /*namespace mm*/
|
||||
} /*namespace xo*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue