alloc/raw/linear: don't align by default
This commit is contained in:
parent
cbce5803b5
commit
09b9c1dc8b
@ -34,7 +34,12 @@ linear::linear (util::view<std::byte*> _data):
|
|||||||
void*
|
void*
|
||||||
linear::allocate (size_t bytes)
|
linear::allocate (size_t bytes)
|
||||||
{
|
{
|
||||||
return allocate (bytes, alignof (std::max_align_t));
|
if (m_cursor + bytes > m_end)
|
||||||
|
throw std::bad_alloc ();
|
||||||
|
|
||||||
|
auto ptr = m_cursor;
|
||||||
|
m_cursor += bytes;
|
||||||
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user