Skip to content
  • Simon Marlow's avatar
    Cleanups related to MAX_FREE_LIST · ef446066
    Simon Marlow authored
    - Rename to the (more correct) NUM_FREE_LISTS
    
    - NUM_FREE_LISTS should be derived from the block and mblock sizes, not
      defined manually.  It was actually too large by one, which caused a
      little bit of (benign) extra work in the form of a redundant loop
      iteration in some cases.
    
    - Add some ASSERTs for input preconditions to log_2() and log_2_ceil()
    
    - Fix some comments
    
    - Fix usage in allocLargeChunk, to account for the fact that
      log_2_ceil() can return NUM_FREE_LISTS.
    ef446066