This patch adds an additional malloc(9) flag to distinguish UMA_ZONE_NOFREE allocations, as previously discussed in https://reviews.freebsd.org/D16620.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Why not M_NOFREE?
I believe that the addition require some (perhaps relatively comprehensive) explanation where to use the flag, and where not to. E.g. is it available to the casual malloc(9) user?
M_NOFREE was already taken by sys/mbuf.h, M_NEVERFREED is one of the alternative names proposed by @alc .
I believe that the addition require some (perhaps relatively comprehensive) explanation where to use the flag, and where not to. E.g. is it available to the casual malloc(9) user?
I see this as more of an internal flag meant to be used by allocators rather than users. At the moment passing it to malloc(9) would effectively be a no-op as its only used by small_alloc.
I refrained from modifying the manpages until we discussed this collectively, but I'll definitely add an explanation once we settle on something.
Mentioning the supposed scope of use for flag in the review would be best. BTW if it is internal to vm allocators, why not call it M_VM_NOFREE?
I'm fine with the name. It would indeed be good to document the flag further, at least in malloc.9.