> On Dec 13, 2021, at 01:13, Otto Moerbeek <[email protected]> wrote: > > On Sun, Dec 12, 2021 at 07:15:51PM -0600, Scott Cheloha wrote: > >> cat(1) sizes its I/O buffer according to the st_blksize of the first >> file it processes. We don't do this very often in the tree. I'm not >> sure if we should trust st_blksize. >> >> It would be simpler to just choose a value that works in practice and >> always use it. >> >> 64K works well. We settled on that for tee(1) recently. > > Why are you also change the allocation to be per-file? You might as > well go for a static buffer if you make it fixed size.
Ottomalloc does canary checks when free(3) is called if malloc_options is set up for it. I always thought that was useful when auditing my code.
