Paul Eggert wrote: > > struct > > { > > size_t nbytes; > > char * data; > > } > > One minor comment: use idx_t instead of size_t, for the usual reasons.
Right, done. Thanks for the reminder. > Also it might be a bit more efficient to put the pointer first. On some CPUs probably, but not on others. Unless it's a clear win, I prefer to avoid such code changes. The entire struct fits into a cache line anyway. Even an attribute _Alignas(2*sizeof(long)) would only help on NetBSD, IIRC, because for heap-allocated data, 2*sizeof(long) is already the default alignment on most platforms. Bruno