Documentation and behavior of memory-related options are inconsistent
With all the recent work around memory use in BIND 9, the documentation and behavior of various memory-related options (both build-time and run-time) has become a bit of a mess in various branches:
-
main
,v9_18
:- the man page for
named
still mentionsexternal
as a legal value for-M
, even though the internal allocator does not exist in those branches any more (and thereforeexternal
does not work),
- the man page for
-
v9_16
:-
the
-M
command-line option accepts aninternal
value, but the latter is neither mentioned in the man page fornamed
nor included innamed -h
output, -
the documentation claims that memory filling is disabled by default unless
--enable-developer
is used; however, that latter point is only true if the internal allocator is used, which is not the default; as a result, memory filling is not performed by default, even if--enable-developer
is used - unless-DISC_MEM_USE_INTERNAL_MALLOC=1
is set at build-time, -
commit c96b6eb5 missed a spot, which results in every BIND 9 build with
-DISC_MEM_USE_INTERNAL_MALLOC=1
set to consistently fail an assertion upon shutdown.
-
The minimum amount of work to do here is to update the documentation in all branches so that it matches the code.
The question of whether we should fix the code for v9.16 is debatable:
-
The "missed spot" thing is easy to fix and it is a clear bug, though definitely not a critical one.
-
As for the confusing memory filling behavior, I think of it as a bug, too - IMHO memory filling should be enabled by default in developer mode even if the system allocator is used. (If that was the case, I would have been able to reproduce #3441 (closed) much more quickly - it is the reason I started this work.)