xo-arena: annex DArena.* DArenaIterator.* from xo-alloc2
This commit is contained in:
parent
f1c094fd43
commit
7cb5ab8289
13 changed files with 25 additions and 23 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "alloc/IAllocIterator_Xfer.hpp"
|
||||
#include "arena/DArenaIterator.hpp"
|
||||
#include <xo/arena/DArenaIterator.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace mm { struct IAllocIterator_DArenaIterator; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "alloc/AAllocator.hpp"
|
||||
#include "alloc/IAllocator_Xfer.hpp"
|
||||
#include "arena/DArena.hpp"
|
||||
#include <xo/arena/DArena.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace mm { struct IAllocator_DArena; }
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ set(SELF_SRCS
|
|||
|
||||
AAllocator.cpp
|
||||
# ArenaConfig.cpp
|
||||
DArena.cpp
|
||||
# DArena.cpp
|
||||
IAllocator_Any.cpp
|
||||
IAllocator_DArena.cpp
|
||||
|
||||
IAllocIterator_Any.cpp
|
||||
DArenaIterator.cpp
|
||||
# DArenaIterator.cpp
|
||||
IAllocIterator_DArenaIterator.cpp
|
||||
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
#include "AllocIterator.hpp"
|
||||
#include "arena/IAllocator_DArena.hpp"
|
||||
#include "arena/IAllocIterator_DArenaIterator.hpp" // for alloc_range
|
||||
#include "arena/DArenaIterator.hpp"
|
||||
#include "padding.hpp"
|
||||
#include <xo/arena/DArenaIterator.hpp>
|
||||
#include <xo/arena/padding.hpp>
|
||||
#include <xo/facet/obj.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
#include <cassert>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
**/
|
||||
|
||||
#include "random_allocs.hpp"
|
||||
#include "arena/DArena.hpp"
|
||||
#include "padding.hpp"
|
||||
#include <xo/arena/DArena.hpp>
|
||||
#include <xo/arena/padding.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
#include <xo/indentlog/print/tag.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#include "ArenaConfig.hpp"
|
||||
#include "AllocError.hpp"
|
||||
#include "AllocInfo.hpp"
|
||||
#include <xo/facet/typeseq.hpp>
|
||||
#include <xo/reflectutil/typeseq.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
|
|
@ -46,7 +46,7 @@ namespace xo {
|
|||
/** @brief type for allocation header (if enabled) **/
|
||||
using header_type = AllocHeader;
|
||||
/** integer identifying a type (see xo::facet::typeid<T>()) **/
|
||||
using typeseq = xo::facet::typeseq;
|
||||
using typeseq = xo::reflect::typeseq;
|
||||
|
||||
/** @brief mode argument for @ref _alloc **/
|
||||
enum class alloc_mode : uint8_t {
|
||||
|
|
@ -280,7 +280,7 @@ namespace xo {
|
|||
static T *
|
||||
construct_with(DArena & ialloc, Args&&... args)
|
||||
{
|
||||
using xo::facet::typeseq;
|
||||
using xo::reflect::typeseq;
|
||||
|
||||
typeseq t = typeseq::id<T>();
|
||||
std::byte * mem = ialloc.alloc(t, sizeof(T));
|
||||
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
set(SELF_LIB xo_arena)
|
||||
set(SELF_SRCS
|
||||
cmpresult.cpp
|
||||
AllocError.cpp
|
||||
AllocInfo.cpp
|
||||
cmpresult.cpp
|
||||
DArena.cpp
|
||||
DArenaIterator.cpp
|
||||
)
|
||||
|
||||
xo_add_shared_library4(${SELF_LIB} ${PROJECT_NAME}Targets ${PROJECT_VERSION} 1 ${SELF_SRCS})
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#include "alloc/AAllocator.hpp"
|
||||
#include "arena/DArena.hpp"
|
||||
#include "arena/DArenaIterator.hpp"
|
||||
//#include "alloc/AAllocator.hpp"
|
||||
#include "DArena.hpp"
|
||||
#include "DArenaIterator.hpp"
|
||||
#include <xo/arena/padding.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
#include <xo/indentlog/print/tag.hpp>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
#include <string.h> // for ::memset()
|
||||
|
||||
namespace xo {
|
||||
using xo::facet::typeseq;
|
||||
using xo::reflect::typeseq;
|
||||
using std::byte;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
* @author Roland Conybeare, Dec 2025
|
||||
**/
|
||||
|
||||
#include "arena/DArenaIterator.hpp"
|
||||
#include "arena/DArena.hpp"
|
||||
#include "DArenaIterator.hpp"
|
||||
#include "DArena.hpp"
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
#include <xo/indentlog/print/tag.hpp>
|
||||
#include <cassert>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#include "object_age.hpp"
|
||||
#include "role.hpp"
|
||||
#include <xo/alloc2/Allocator.hpp>
|
||||
#include <xo/alloc2/arena/DArena.hpp>
|
||||
#include <xo/arena/DArena.hpp>
|
||||
#include <xo/arena/ArenaConfig.hpp>
|
||||
#include <memory>
|
||||
#include <array>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include "AllocInfo.hpp"
|
||||
#include "generation.hpp"
|
||||
#include "arena/DArenaIterator.hpp"
|
||||
#include "cmpresult.hpp"
|
||||
#include <xo/arena/DArenaIterator.hpp>
|
||||
#include <xo/arena/cmpresult.hpp>
|
||||
|
||||
namespace xo {
|
||||
namespace mm {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
**/
|
||||
|
||||
#include "random_allocs.hpp"
|
||||
#include "arena/DArena.hpp"
|
||||
#include "padding.hpp"
|
||||
#include <xo/arena/DArena.hpp>
|
||||
#include <xo/arena/padding.hpp>
|
||||
#include <xo/indentlog/scope.hpp>
|
||||
#include <xo/indentlog/print/tag.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue