• Paul Eggert's avatar
    Minor pseudovector allocation cleanups · 63a8f4cf
    Paul Eggert authored
    * src/alloc.c (VECTOR_BLOCK_SIZE, VECTOR_BLOCK_BYTES)
    (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX):
    Prefer enums to macros where either will do.
    (allocate_vector_from_block): Arg is ptrdiff_t, not size_t.
    Use eassume instead of eassert.
    (PSEUDOVEC_STRUCT): New macro, which verifies the already-existing
    assumption that the vector-like objects are small.
    (cleanup_vector): Use it.  Use if-then-else systematically;
    this lets GCC do a bit better job.
    
    2018-08-08  Paul Eggert  <eggert@cs.ucla.edu>
    
    * src/alloc.c (VBLOCK_BYTES_MAX): Use vroundup_ct, not
    vroundup, so that can be used in static assertions.
    63a8f4cf
alloc.c 204 KB