Library: Analysis and planning towards a generic Allocator Concept
The following structure can be expected, after __switching to C++20__ * Concept **Allocator** deals with the bare memory allocation * Concept **Factory** handles object creation and disposal by delegation * Concept **Handle** is a ready-made functor for dependency-injection Right now, an implementation of the ''prospective Factory Concept'' can be provided, by delegating through `std::allocator_traits` to a given `std::allocator` or compatible object
This commit is contained in:
parent
5259000bc4
commit
8ca3c61c6f
3 changed files with 324 additions and 87 deletions
|
|
@ -64,12 +64,139 @@
|
|||
|
||||
|
||||
namespace lib {
|
||||
namespace allo { /** Concepts and Adapter for custom memory management */
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1366 : define Allocator Concepts here
|
||||
/// TODO the following Concepts can be expected here (with C++20)
|
||||
/// - Allocator : for the bare memory allocation
|
||||
/// - Factory : for object fabrication and disposal
|
||||
/// - Handle : a functor front-end to be dependency-injected
|
||||
|
||||
|
||||
/**
|
||||
* Adapter to implement the *Factory* concept based on a `std::allocator`
|
||||
* @tparam ALO a std::allocator instance or anything compliant to [Allocator]
|
||||
* [Allocator]: https://en.cppreference.com/w/cpp/named_req/Allocator
|
||||
* @note in addition to the abilities defined by the standard, this adapter
|
||||
* strives to provide some kind of _lateral leeway,_ attempting to
|
||||
* create dedicated allocators for other types than the BaseType
|
||||
* implied by the given \a ALO (standard-allocator).
|
||||
* - this is possible if the rebound allocator can be constructed
|
||||
* from the given base allocator
|
||||
* - alternatively, an attempt will be made to default-construct
|
||||
* the rebound allocator for the other type requested.
|
||||
* @warn Both avenues for adaptation may fail, which could lead to
|
||||
* compilation or runtime failures.
|
||||
*/
|
||||
template<class ALO>
|
||||
class StdFactory
|
||||
{
|
||||
using Allo = ALO;
|
||||
using AlloT = std::allocator_traits<Allo>;
|
||||
using BaseType = typename Allo::value_type;
|
||||
|
||||
Allo allocator_;
|
||||
|
||||
template<typename X>
|
||||
auto
|
||||
adaptAllocator (Allo const& baseAllocator)
|
||||
{
|
||||
using XAllo = typename AlloT::template rebind_alloc<X>;
|
||||
if constexpr (std::is_constructible_v<XAllo, Allo>)
|
||||
return XAllo(allocator_);
|
||||
else
|
||||
return XAllo();
|
||||
}
|
||||
|
||||
template<class ALOT, typename...ARGS>
|
||||
typename ALOT::pointer
|
||||
construct (typename ALOT::alocator_type& allo, ARGS&& ...args)
|
||||
{
|
||||
auto loc = ALOT::allocate (allocator_, 1);
|
||||
ALOT::construct (allocator_, loc, std::forward<ARGS>(args)...);
|
||||
return loc;
|
||||
}
|
||||
|
||||
template<class ALOT, typename...ARGS>
|
||||
void
|
||||
destroy (typename ALOT::alocator_type& allo, typename ALOT::pointer elm)
|
||||
{
|
||||
ALOT::destroy (allo, elm);
|
||||
ALOT::deallocate (allo, elm, 1);
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
* Create an instance of the adapter factory,
|
||||
* forwarding to the embedded standard conforming allocator
|
||||
* for object creation and destruction and memory management.
|
||||
* @param allo (optional) instance of the C++ standard allocator
|
||||
* used for delegation, will be default constructed if omitted.
|
||||
* @remark the adapted standard allocator is assumed to be either a copyable
|
||||
* value object, or even a mono-state; in both cases, a dedicated
|
||||
* manager instance residing »elsewhere« is referred, rendering
|
||||
* all those front-end instances exchangeable.
|
||||
*/
|
||||
StdFactory (Allo allo = Allo{})
|
||||
: allocator_{std::move (allo)}
|
||||
{ }
|
||||
|
||||
template<class XALO>
|
||||
bool constexpr operator== (StdFactory<XALO> const& o) const
|
||||
{
|
||||
return allocator_ == o.allocator_;
|
||||
}
|
||||
template<class XALO>
|
||||
bool constexpr operator!= (StdFactory<XALO> const& o) const
|
||||
{
|
||||
return not (allocator_ == o.allocator_);
|
||||
}
|
||||
|
||||
|
||||
/** create new element using the embedded allocator */
|
||||
template<class TY, typename...ARGS>
|
||||
TY*
|
||||
create (ARGS&& ...args)
|
||||
{
|
||||
if constexpr (std::is_same_v<TY, BaseType>)
|
||||
{
|
||||
return construct<AlloT> (allocator_, std::forward<ARGS>(args)...);
|
||||
}
|
||||
else
|
||||
{
|
||||
using XAlloT = typename AlloT::template rebind_traits<TY>;
|
||||
auto xAllo = adaptAllocator<TY> (allocator_);
|
||||
return construct<XAlloT> (xAllo, std::forward<ARGS>(args)...);
|
||||
}
|
||||
}
|
||||
|
||||
/** destroy the given element and discard the associated memory */
|
||||
template<class TY>
|
||||
void
|
||||
dispose (TY* elm)
|
||||
{
|
||||
if constexpr (std::is_same_v<TY, BaseType>)
|
||||
{
|
||||
destroy<AlloT> (allocator_, elm);
|
||||
}
|
||||
else
|
||||
{
|
||||
using XAlloT = typename AlloT::template rebind_traits<TY>;
|
||||
auto xAllo = adaptAllocator<TY> (allocator_);
|
||||
destroy<XAlloT> (xAllo, elm);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1366 : the following code becomes obsolete in the long term
|
||||
|
||||
/**
|
||||
* Placeholder implementation for a custom allocator
|
||||
* @todo shall be replaced by an AllocationCluster eventually
|
||||
* @note conforming to a prospective C++20 Concept `Allo<TYPE>`
|
||||
* @todo 5/2024 to be reworked and aligned with a prospective C++20 Allocator Concept /////////////////////TICKET #1366
|
||||
* @remark using `std::list` container, since re-entrant allocation calls are possible,
|
||||
* meaning that further allocations will be requested recursively from a ctor.
|
||||
* Moreover, for the same reason we separate the allocation from the ctor call,
|
||||
|
|
@ -98,7 +225,7 @@ namespace lib {
|
|||
return * std::launder (reinterpret_cast<TY*> (&buf_));
|
||||
}
|
||||
void
|
||||
discard() /// @warning strong assumption made here: Payload was created
|
||||
discard() /// @warning strong assumption made here: Payload was created
|
||||
{
|
||||
access().~TY();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
#include "lib/error.hpp"
|
||||
#include "lib/nocopy.hpp"
|
||||
#include "lib/iter-adapter.hpp"
|
||||
#include "lib/allocator-handle.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
|
@ -110,83 +111,6 @@ namespace lib {
|
|||
}
|
||||
};
|
||||
|
||||
template<class ALO>
|
||||
struct OwningAlloc
|
||||
: util::MoveOnly
|
||||
{
|
||||
using Allo = ALO;
|
||||
using AlloT = std::allocator_traits<Allo>;
|
||||
using BaseType = typename Allo::value_type;
|
||||
|
||||
Allo allocator_;
|
||||
|
||||
OwningAlloc (Allo allo = Allo{})
|
||||
: allocator_{allo}
|
||||
{ }
|
||||
|
||||
template<typename X>
|
||||
auto
|
||||
adaptAllocator (Allo const& baseAllocator)
|
||||
{
|
||||
using XAllo = typename AlloT::template rebind_alloc<X>;
|
||||
if constexpr (std::is_constructible_v<XAllo, Allo>)
|
||||
return XAllo(allocator_);
|
||||
else
|
||||
return XAllo();
|
||||
}
|
||||
|
||||
template<class ALOT, typename...ARGS>
|
||||
auto&
|
||||
construct (typename ALOT::alocator_type& allo, ARGS&& ...args)
|
||||
{
|
||||
auto loc = ALOT::allocate (allocator_, 1);
|
||||
ALOT::construct (allocator_, loc, std::forward<ARGS>(args)...);
|
||||
return *loc;
|
||||
}
|
||||
|
||||
template<class ALOT, typename...ARGS>
|
||||
void
|
||||
destroy (typename ALOT::alocator_type& allo, typename ALOT::pointer elm)
|
||||
{
|
||||
ALOT::destroy (allo, elm);
|
||||
ALOT::deallocate (allo, elm, 1);
|
||||
}
|
||||
|
||||
|
||||
/** create new element using the embedded allocator */
|
||||
template<class TY, typename...ARGS>
|
||||
TY&
|
||||
create (ARGS&& ...args)
|
||||
{
|
||||
if constexpr (std::is_same_v<TY, BaseType>)
|
||||
{
|
||||
return construct<AlloT> (allocator_, std::forward<ARGS>(args)...);
|
||||
}
|
||||
else
|
||||
{
|
||||
using XAlloT = typename AlloT::template rebind_traits<TY>;
|
||||
auto xAllo = adaptAllocator<TY> (allocator_);
|
||||
return construct<XAlloT> (xAllo, std::forward<ARGS>(args)...);
|
||||
}
|
||||
}
|
||||
|
||||
template<class TY>
|
||||
void
|
||||
destroy (TY* elm)
|
||||
{
|
||||
if constexpr (std::is_same_v<TY, BaseType>)
|
||||
{
|
||||
destroy<AlloT> (allocator_, elm);
|
||||
}
|
||||
else
|
||||
{
|
||||
using XAlloT = typename AlloT::template rebind_traits<TY>;
|
||||
auto xAllo = adaptAllocator<TY> (allocator_);
|
||||
destroy<XAlloT> (xAllo, elm);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64879,13 +64879,63 @@
|
|||
<node CREATED="1686440015880" ID="ID_1210980349" MODIFIED="1686440023702" TEXT="Allokatoren">
|
||||
<node CREATED="1686439921942" ID="ID_414891440" MODIFIED="1686440085275" TEXT="API-Scheme + Concept für Allokator">
|
||||
<linktarget COLOR="#61748b" DESTINATION="ID_414891440" ENDARROW="Default" ENDINCLINATION="-1705;141;" ID="Arrow_ID_1346780792" SOURCE="ID_1468838708" STARTARROW="None" STARTINCLINATION="-606;-35;"/>
|
||||
<node CREATED="1686440109090" ID="ID_9110272" MODIFIED="1686440111594" TEXT="Allo">
|
||||
<node CREATED="1686440112617" ID="ID_1724629144" MODIFIED="1686440118311" TEXT="ein Funktor">
|
||||
<node CREATED="1716725611213" ID="ID_1027485617" MODIFIED="1716725614822" TEXT="Begriffe">
|
||||
<node CREATED="1716725619016" ID="ID_1669428622" MODIFIED="1716725621288" TEXT="Allocator">
|
||||
<node CREATED="1716725648216" ID="ID_1665805889" MODIFIED="1716725665906" TEXT="ein Manager für Allokationen"/>
|
||||
<node CREATED="1716725666886" ID="ID_155307985" MODIFIED="1716725715261" TEXT="provides »Uninitialised Memory«"/>
|
||||
<node CREATED="1716725723585" ID="ID_724663610" MODIFIED="1716725748141">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
nach <u>Alexandrescu</u>: sollte <i>composable</i> sein
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716725768744" ID="ID_1818305157" MODIFIED="1716725771188" TEXT="Factory">
|
||||
<node CREATED="1716725788526" ID="ID_180229415" MODIFIED="1716725818155">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
kann <b>Objekte beliebigen Typs</b> erzeugen und verwerfen
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1716726779019" ID="ID_801542095" MODIFIED="1716726788998" TEXT="bietet einen Verdrahtungs-Konstruktor"/>
|
||||
<node CREATED="1716726791625" ID="ID_292636267" MODIFIED="1716727161595" TEXT="erlaubt: compile-time Einschränkung unterstützter Typen">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716727168359" ID="ID_1168541679" MODIFIED="1716727170611" TEXT="Handle">
|
||||
<node CREATED="1716727176078" ID="ID_119791426" MODIFIED="1716727184575" TEXT="als Funktor verpacktes Front-End"/>
|
||||
<node CREATED="1716727232495" ID="ID_1014593006" MODIFIED="1716727262302" TEXT="wird stets »woanders« konstruiert (DI)"/>
|
||||
<node CREATED="1716727282153" ID="ID_147195583" MODIFIED="1716727297200" TEXT="materialisiert das Nutzungs-Protokoll">
|
||||
<node CREATED="1716727298233" ID="ID_628795010" MODIFIED="1716727305980" TEXT="es gibt nur eine einzige Nutz-Funktion"/>
|
||||
<node CREATED="1716727306740" ID="ID_437742597" MODIFIED="1716727379492" TEXT="Freigabe entweder automatisch (Smart-Ptr) oder extern"/>
|
||||
</node>
|
||||
<node CREATED="1716728228022" ID="ID_1115072555" MODIFIED="1716728406529" TEXT="Rückgabewert">
|
||||
<linktarget COLOR="#4c6685" DESTINATION="ID_1115072555" ENDARROW="Default" ENDINCLINATION="-6;7;" ID="Arrow_ID_495773776" SOURCE="ID_466400198" STARTARROW="None" STARTINCLINATION="-86;5;"/>
|
||||
<node CREATED="1716728244832" ID="ID_497827516" MODIFIED="1716728264218" TEXT="Referenz ⟹ Objekt nutzen und vergessen"/>
|
||||
<node CREATED="1716728265673" ID="ID_1694740593" MODIFIED="1716728295173" TEXT="Smart-Ptr ⟹ Ownership wird übertragen"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1686440109090" ID="ID_9110272" MODIFIED="1716728322677" TEXT="Konventionen">
|
||||
<node CREATED="1686440112617" ID="ID_1724629144" MODIFIED="1716728332820" TEXT="Funktor/Handle">
|
||||
<node CREATED="1686440141688" ID="ID_34122927" MODIFIED="1686440150192" TEXT="hat variadischen Function-call-Operator"/>
|
||||
<node CREATED="1686440152351" ID="ID_466400198" MODIFIED="1686440164225" TEXT="liefert Referenz auf ein neu erzeugtes Objekt"/>
|
||||
<node CREATED="1716728430379" ID="ID_1352563088" MODIFIED="1716728444699" TEXT="aber stets nur einen festen Produkt-Typ"/>
|
||||
<node CREATED="1686440152351" ID="ID_466400198" MODIFIED="1716728406528" TEXT="Rückgabewert spezifiziert den Nutzungs-Kontrakt">
|
||||
<arrowlink COLOR="#4c6685" DESTINATION="ID_1115072555" ENDARROW="Default" ENDINCLINATION="-6;7;" ID="Arrow_ID_495773776" STARTARROW="None" STARTINCLINATION="-86;5;"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1686440796916" ID="ID_1611026360" MODIFIED="1686440803081" TEXT="Zugriff">
|
||||
<node CREATED="1686440803679" ID="ID_398802090" MODIFIED="1686440811090" TEXT="per Referenz auf eine Implementierung"/>
|
||||
<node CREATED="1716728622673" ID="ID_1491271218" MODIFIED="1716728631034" TEXT="ein Allokator oder Manager ist move-only"/>
|
||||
<node CREATED="1686440803679" ID="ID_398802090" MODIFIED="1716728642147" TEXT="per Referenz auf eine Factory"/>
|
||||
<node CREATED="1686440811749" ID="ID_1364654659" MODIFIED="1686440816921" TEXT="per Value Front-End">
|
||||
<node CREATED="1686440832060" ID="ID_976218427" MODIFIED="1686440839350" TEXT="dieses verpackt einen Pointer"/>
|
||||
<node CREATED="1686440839859" ID="ID_863438543" MODIFIED="1686440847211" TEXT="ist kopierbar und zuweisbar"/>
|
||||
|
|
@ -64918,8 +64968,135 @@
|
|||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1686440286925" ID="ID_1913917309" MODIFIED="1686440290128" TEXT="AlloP">
|
||||
<node CREATED="1686440291217" ID="ID_1760718510" MODIFIED="1686440311118" TEXT="wie Allo; aber liefert smart-Ptr/Handle per Value "/>
|
||||
<node CREATED="1716728664652" ID="ID_1644685634" MODIFIED="1716728666879" TEXT="Strukturen">
|
||||
<node CREATED="1716728667779" ID="ID_467995115" MODIFIED="1716728670092" TEXT="Namen">
|
||||
<node CREATED="1716728670955" ID="ID_1816165091" MODIFIED="1716728689109">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Namespace: <font face="Monospaced" color="#2116b9">lib::allo</font>
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#d2beaf" COLOR="#5c4d6e" CREATED="1716728705369" ID="ID_38954795" MODIFIED="1716728721990">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
die Grundbegriffe sind für <b>Concepts</b> reserviert
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="hourglass"/>
|
||||
<node CREATED="1716728724156" ID="ID_1720325177" MODIFIED="1716728727615" TEXT="Allocator">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716728888214" ID="ID_419230520" MODIFIED="1716728901716" TEXT="Interface muß ausgearbeitet werden">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#d2beaf" COLOR="#a14874" CREATED="1716728939207" ID="ID_1238060448" LINK="#ID_1023319847" MODIFIED="1716729134727" TEXT="Anregungen aus dem Vortrag von Alexandrescu 2015">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
wenngleich auch der Vortrag relativ viel Geplänkel enthält, so ergibt sich doch insgesamt eine Sicht auf die Design-Erfahrungen der letzten 15 Jahre, und die daraus ableitbaren Strukturen erscheinen mir ausgereifter als die Strukturen aus dem C++ - Standard
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1716729146987" ID="ID_56237692" MODIFIED="1716729150710" TEXT="composability"/>
|
||||
<node CREATED="1716729151298" ID="ID_1248784049" MODIFIED="1716729164780" TEXT="ownership für Sub-Allokatoren"/>
|
||||
<node CREATED="1716729172927" ID="ID_1743961746" MODIFIED="1716729196504" TEXT="re-alloc und Bulk-Allocations unterstützen"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716728728691" ID="ID_1876160153" MODIFIED="1716728731919" TEXT="Factory">
|
||||
<node CREATED="1716729304397" ID="ID_398780705" MODIFIED="1716729307552" TEXT="generische Funktionen">
|
||||
<node CREATED="1716729308333" ID="ID_1903078168" MODIFIED="1716729310113" TEXT="create"/>
|
||||
<node CREATED="1716729310652" ID="ID_491836084" MODIFIED="1716729312336" TEXT="dispose"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716729343016" ID="ID_284921403" MODIFIED="1716729376612" TEXT="ein »durchreichbarer« Konstruktor">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1716729377699" ID="ID_443757395" MODIFIED="1716729387398" TEXT="zu klären wie man das als Concept formuliert"/>
|
||||
<node CREATED="1716729388058" ID="ID_829616258" MODIFIED="1716729697882" TEXT="die Idee ist, daß ein darauf aufbauender Container einen ctor-Parameter akzeptiert">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Hier wird wahrscheinlich ein komplexes Subsystem aus Metaprogrammierung entstehen. Die verschiedensten praktischen Varianten sind denkbar und auch valide
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
die Factory kann sich selbst erzeugen, indem sie auf einen Monostate zurückgreift. Das ist in der Praxis der wichtigste Fall, der im Besonderen für die normale Heap-Allokation gilt, aber auch Thread-Local und damit Kontext-Bezogen auslegbar ist.
|
||||
</li>
|
||||
<li>
|
||||
es könnte nur Copy-Construction oder Delegation erlaubt sein, und die Factory ist in diesem Fall nur ein Front-End-Handle
|
||||
</li>
|
||||
<li>
|
||||
man könnte einen Konstruktor bieten, der einen C++-Standard-Allokator akzeptiert und adaptiert
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716729711246" ID="ID_1882332665" MODIFIED="1716729736181">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Factory wird das <b>zentrale Schnittstellen-Concept</b> zur restlichen Applikation
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716728769205" ID="ID_258354779" MODIFIED="1716728771489" TEXT="Handle">
|
||||
<node BACKGROUND_COLOR="#ebdd92" COLOR="#5d1b0c" CREATED="1716728772357" ID="ID_1285819326" MODIFIED="1716728816482" TEXT="nicht klar inwiefern man das als Concept formulieren kann">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1716728855356" ID="ID_1397604133" MODIFIED="1716728863978" TEXT="Concept soll hier vor allem die Intention markieren"/>
|
||||
<node CREATED="1716728822846" ID="ID_1044018412" MODIFIED="1716728852990" TEXT="könnte auf eine Factory rekurieren"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716729790244" ID="ID_939396018" MODIFIED="1716729812215">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Präfix <font face="Monospaced" color="#542416">Std</font>
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<node CREATED="1716729814640" ID="ID_1355224350" MODIFIED="1716730338658" TEXT="adaptiert die C++ - Standard-Allokatoren">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716729870295" ID="ID_1824116751" MODIFIED="1716729887422" TEXT="StdFactory bereits auf C++17-Level definierbar">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716730281711" ID="ID_1884748054" MODIFIED="1716730333602" TEXT="StdAllocator adaptiert std::allocator ⟼ (Lumiera)-Allocator-Concept">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716729892325" ID="ID_968627588" MODIFIED="1716729908390" TEXT="HandleBuilder">
|
||||
<node CREATED="1716729917154" ID="ID_1465368654" MODIFIED="1716729928764" TEXT="referiert auf eine Factory">
|
||||
<node CREATED="1716730247541" ID="ID_514481234" MODIFIED="1716730253608" TEXT="diese kann direkt gegeben sein"/>
|
||||
<node CREATED="1716730254180" ID="ID_696053646" MODIFIED="1716730262711" TEXT="oder stattdessen ein Allocator"/>
|
||||
<node CREATED="1716730263352" ID="ID_1238344826" MODIFIED="1716730270646" TEXT="oder nur ein StdAllocator"/>
|
||||
</node>
|
||||
<node CREATED="1716729929623" ID="ID_896454729" MODIFIED="1716729950825" TEXT="konfigurierbares Verhalten">
|
||||
<node CREATED="1716729953172" ID="ID_1111862301" MODIFIED="1716729963023" TEXT="Erzeugen-und-Vergessen"/>
|
||||
<node CREATED="1716729963501" ID="ID_1778796635" MODIFIED="1716729967310" TEXT="unique-Ownership"/>
|
||||
<node CREATED="1716729967835" ID="ID_1221094850" MODIFIED="1716729972174" TEXT="shared-Ownership"/>
|
||||
<node CREATED="1716730350559" ID="ID_1127126530" MODIFIED="1716730367497" TEXT="std::allocator"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1716730009509" ID="ID_40171394" MODIFIED="1716730015265" TEXT="Integration mit C++ - Standard">
|
||||
<node CREATED="1716730016852" ID="ID_1532087532" MODIFIED="1716730021000" TEXT="StdFactory"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1686696361018" ID="ID_320473769" MODIFIED="1686696804492" TEXT="generischen Rahmen + front-End schaffen">
|
||||
|
|
@ -64996,10 +65173,17 @@
|
|||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1716683768504" ID="ID_1462693245" MODIFIED="1716683781871" TEXT="Draft / Prototyping">
|
||||
<linktarget COLOR="#943871" DESTINATION="ID_1462693245" ENDARROW="Default" ENDINCLINATION="-1171;2688;" ID="Arrow_ID_230796845" SOURCE="ID_158782942" STARTARROW="None" STARTINCLINATION="-815;-23;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716683783293" ID="ID_910814489" MODIFIED="1716683827701" TEXT="Standard-Allocator in LinkedElements integrieren">
|
||||
<linktarget COLOR="#515b9a" DESTINATION="ID_910814489" ENDARROW="Default" ENDINCLINATION="167;-10;" ID="Arrow_ID_96021000" SOURCE="ID_48162464" STARTARROW="None" STARTINCLINATION="168;8;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1716743917838" ID="ID_1038539692" MODIFIED="1716743966300" TEXT="Entwurf: StdFactory (Adapter)">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716743934765" ID="ID_472100312" MODIFIED="1716743962761" TEXT="Policy OwningHeapAllocated re-implementieren auf Basis von StdFactory">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1716683843917" ID="ID_157117808" MODIFIED="1716684087738" TEXT="Standard-Allocator für AllocationCluster bereitstellen">
|
||||
<linktarget COLOR="#664940" DESTINATION="ID_157117808" ENDARROW="Default" ENDINCLINATION="1249;67;" ID="Arrow_ID_572544135" SOURCE="ID_1456163487" STARTARROW="None" STARTINCLINATION="131;-1027;"/>
|
||||
|
|
@ -81257,7 +81441,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node CREATED="1715624984553" ID="ID_1271849826" MODIFIED="1715625002785" TEXT="open-sized + move-only"/>
|
||||
<node CREATED="1715625004020" ID="ID_863474418" MODIFIED="1715625011022" TEXT="fixed-size + noncopyable"/>
|
||||
</node>
|
||||
<node CREATED="1715625022874" ID="ID_158782942" MODIFIED="1715625045459" TEXT="Allocator externalisieren (wie in STDL-Containern)"/>
|
||||
<node CREATED="1715625022874" ID="ID_158782942" MODIFIED="1715625045459" TEXT="Allocator externalisieren (wie in STL-Containern)">
|
||||
<arrowlink COLOR="#943871" DESTINATION="ID_1462693245" ENDARROW="Default" ENDINCLINATION="-1171;2688;" ID="Arrow_ID_230796845" STARTARROW="None" STARTINCLINATION="-815;-23;"/>
|
||||
</node>
|
||||
<node CREATED="1715627229164" ID="ID_1793700784" MODIFIED="1715627351601" TEXT="das Concept ist für später aufgehoben">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
|
|
@ -82231,9 +82417,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node CREATED="1680563460649" ID="ID_127710483" MODIFIED="1715624384997" TEXT="MemManagement">
|
||||
<arrowlink COLOR="#454059" DESTINATION="ID_1595450559" ENDARROW="Default" ENDINCLINATION="-1036;-77;" ID="Arrow_ID_1704085390" STARTARROW="None" STARTINCLINATION="-161;430;"/>
|
||||
<node CREATED="1715623566743" ID="ID_688601712" MODIFIED="1716677717812" TEXT="AllocationCluster">
|
||||
<linktarget COLOR="#5e576b" DESTINATION="ID_688601712" ENDARROW="Default" ENDINCLINATION="-933;-99;" ID="Arrow_ID_1200230919" SOURCE="ID_1849931457" STARTARROW="None" STARTINCLINATION="-758;59;"/>
|
||||
<linktarget COLOR="#816f7b" DESTINATION="ID_688601712" ENDARROW="Default" ENDINCLINATION="95;-321;" ID="Arrow_ID_1440452458" SOURCE="ID_1219678116" STARTARROW="None" STARTINCLINATION="-521;38;"/>
|
||||
<linktarget COLOR="#816f7b" DESTINATION="ID_688601712" ENDARROW="Default" ENDINCLINATION="95;-321;" ID="Arrow_ID_859179840" SOURCE="ID_303611553" STARTARROW="None" STARTINCLINATION="-264;24;"/>
|
||||
<linktarget COLOR="#5e576b" DESTINATION="ID_688601712" ENDARROW="Default" ENDINCLINATION="-933;-99;" ID="Arrow_ID_1200230919" SOURCE="ID_1849931457" STARTARROW="None" STARTINCLINATION="-758;59;"/>
|
||||
<node CREATED="1715786334834" ID="ID_885525745" MODIFIED="1715786341860" TEXT="Design / Systematik">
|
||||
<node CREATED="1715786372102" ID="ID_1591071302" MODIFIED="1715786382355" TEXT="Aufwand für Memory-Management wird gebündelt"/>
|
||||
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1715786522984" ID="ID_1870113951" MODIFIED="1715786580201" TEXT="Konflikt: Performance ⟷ Sicherheit">
|
||||
|
|
|
|||
Loading…
Reference in a new issue