mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 01:30:12 +01:00
ircd::allocator::incore: Handle null buffer case without throwing.
This commit is contained in:
parent
dc5dc6626b
commit
ff8c1e92ae
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue