From 630816617911b39ecbb59a35ebfd4efffbac42c5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 19 Dec 2018 17:34:47 +1100 Subject: [PATCH] alloc/aligned/foreign: actually correct the allocated address --- alloc/raw/aligned/foreign.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alloc/raw/aligned/foreign.hpp b/alloc/raw/aligned/foreign.hpp index dec13839..93ad2dbd 100644 --- a/alloc/raw/aligned/foreign.hpp +++ b/alloc/raw/aligned/foreign.hpp @@ -70,7 +70,8 @@ namespace cruft::alloc::raw::aligned { cruft::view allocate (std::size_t bytes) { - return m_successor.allocate (bytes); + auto res = m_successor.allocate (bytes); + return { res.begin () + m_offset, bytes }; }