• Max Kellermann's avatar
    util/HugeAllocator: fix division by zero due to inverted check · 13f9f031
    Max Kellermann authored
    There were two ways this could fail:
    
    1. division by zero when sysconf(_SC_PAGESIZE)==0
    
    2. mmap() failure because the size parameter is not aligned to page
       size
    
    Neither ever happened: sysconf() never fails, and the only caller
    passes a size that is already aligned.  Phew.
    13f9f031
HugeAllocator.cxx 2.54 KB