Commit 42a3a87f authored by Max Kellermann's avatar Max Kellermann

util/HugeAllocator: paranoid check for sysconf()<0

Just in case.
parent 9dfedbe6
...@@ -48,7 +48,7 @@ static size_t ...@@ -48,7 +48,7 @@ static size_t
AlignToPageSize(size_t size) AlignToPageSize(size_t size)
{ {
static const long page_size = sysconf(_SC_PAGESIZE); static const long page_size = sysconf(_SC_PAGESIZE);
if (page_size == 0) if (page_size <= 0)
return size; return size;
size_t ps(page_size); size_t ps(page_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment