• Nils Goroll's avatar
    Be more precise about the maximum number of segments per list block · 62e1f319
    Nils Goroll authored
    UINT16_MAX would be just over a disk block, and allocating another
    3.93k for a single additional segment does not make sense.
    
    	(gdb) p /x sizeof(struct fellow_disk_seg) * 65534 +
    		sizeof(struct fellow_disk_seglist)
    	$7 = 0x37ffd0
    
    Also fix a potential overflow, where a uint16_t was incremented after
    clamping to UINT16_MAX.
    62e1f319
fellow_cache.c 136 KB