Skip to content
  • Scott D Phillips's avatar
    util: Add a randomized test for the virtual memory allocator · 943fecc5
    Scott D Phillips authored
    
    
    The test pseudo-randomly makes allocations and deallocations with
    the virtual memory allocator and checks that the results are
    consistent. Specifically, we test that:
    
     * no result from the allocator overlaps an already allocated range
     * allocated memory fulfills the stated alignment requirement
     * a failed result from the allocator could not have been fulfilled
     * memory freed to the allocator can later be allocated again
    
    v2: - fix if() in test() to actually run fill()
    v3: - add c++11 build flag (Jason)
        - test the full 64-bit range (Jason)
    
    Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
    943fecc5