alloc/foreign: dellocate should take a void pointer
This commit is contained in:
parent
ccdc0b6807
commit
442dd12f8f
@ -76,17 +76,17 @@ namespace cruft::alloc::aligned {
|
|||||||
|
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
deallocate (u08 *ptr, std::size_t bytes, std::size_t alignment)
|
deallocate (void *ptr, std::size_t bytes, std::size_t alignment)
|
||||||
{
|
{
|
||||||
CHECK_MOD (m_alignment, alignment);
|
CHECK_MOD (m_alignment, alignment);
|
||||||
return m_successor.deallocate (ptr - m_offset, bytes, alignment);
|
return m_successor.deallocate (reinterpret_cast<u08*> (ptr) - m_offset, bytes, alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
deallocate (u08 *ptr, std::size_t bytes)
|
deallocate (void *ptr, std::size_t bytes)
|
||||||
{
|
{
|
||||||
return m_successor.deallocate (ptr - m_offset, bytes, m_alignment);
|
return m_successor.deallocate (reinterpret_cast<u08*> (ptr) - m_offset, bytes, m_alignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user