esballoc(9f) could document esballoca/desballoca
In addition to esballoc/desballoc that are documented in esballoc(9f) the system provides variants of those functions with an 'a' suffix (esballoca/desballoca) which add a ref to the returned mblk, causing that mblk to be treated as read-only in the streams stack. Note that esballoca is used (eg.) in the NFS code for loaned buffers.
It would be nice if esballoc(9f) documented all four related functions.
Perhaps also add a comment before gesballoc() in io/stream.c like:
/* * Generic esballoc used to implement the four flavors: [d]esballoc[a]. * The variants with a 'd' prefix (desballoc, desballoca) * directly free the mblk when it loses its last ref, * where the other variants free asynchronously. * The variants with an 'a' suffix (esballoca, desballoca) * add an extra ref, effectively letting the streams subsystem * know that the message data should not be modified. */