alloc/foreign: add warning about non-trivial child allocators

This commit is contained in:
Danny Robson 2018-03-02 12:45:52 +11:00
parent 950ac2229f
commit 15fad39e8a

View File

@ -34,6 +34,11 @@ namespace util::alloc::raw::aligned {
/// alignment
/// * using a direct alignment child to service the requests
/// * then applying the reverse offset to values as we return the values
///
/// This approach will explode if a child allocator wants to write to the
/// range, so the user is mostly restricted to very simple allocators
/// (like 'linear'). This is why we use a view based at nullptr; any
/// mistaken access is quite a lot more likely to fault here.
template <typename ChildT>
class foreign {
public: