util/HugeAllocator: paranoid check for sysconf()<0
Just in case.
This commit is contained in:
parent
9dfedbe619
commit
42a3a87f13
@ -48,7 +48,7 @@ static size_t
|
||||
AlignToPageSize(size_t size)
|
||||
{
|
||||
static const long page_size = sysconf(_SC_PAGESIZE);
|
||||
if (page_size == 0)
|
||||
if (page_size <= 0)
|
||||
return size;
|
||||
|
||||
size_t ps(page_size);
|
||||
|
Loading…
Reference in New Issue
Block a user