0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-01 17:48:56 +02:00

ircd::allocator::incore: Handle null buffer case without throwing.

This commit is contained in:
Jason Volk 2022-07-13 21:05:02 -07:00
parent dc5dc6626b
commit ff8c1e92ae

View file

@ -288,6 +288,9 @@ ircd::allocator::incore(const const_buffer &buf)
align(begin(buf), info::page_size)
};
if(unlikely(!base))
return 0;
const auto top
{
align_up(end(buf), info::page_size)