diff mbox series

glibc.malloc.check: Fix nit in documentation

Message ID 20210704124445.479444-1-siddhesh@sourceware.org
State New
Headers show
Series glibc.malloc.check: Fix nit in documentation | expand

Commit Message

Siddhesh Poyarekar July 4, 2021, 12:44 p.m. UTC
The tunable will not work with *any* non-zero tunable value since its
list of allowed values is 0-3.  Fix the documentation to reflect that.
---
 manual/memory.texi   | 10 +++++-----
 manual/tunables.texi |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Adhemerval Zanella July 6, 2021, 7:44 p.m. UTC | #1
On 04/07/2021 09:44, Siddhesh Poyarekar via Libc-alpha wrote:
> The tunable will not work with *any* non-zero tunable value since its
> list of allowed values is 0-3.  Fix the documentation to reflect that.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  manual/memory.texi   | 10 +++++-----
>  manual/tunables.texi |  2 +-
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/manual/memory.texi b/manual/memory.texi
> index 28ec2e4e63..31ee36be8c 100644
> --- a/manual/memory.texi
> +++ b/manual/memory.texi
> @@ -1364,11 +1364,11 @@ The block was already freed.
>  Another possibility to check for and guard against bugs in the use of
>  @code{malloc}, @code{realloc} and @code{free} is to set the environment
>  variable @code{MALLOC_CHECK_}.  When @code{MALLOC_CHECK_} is set to a
> -non-zero value, a special (less efficient) implementation is used which
> -is designed to be tolerant against simple errors, such as double calls
> -of @code{free} with the same argument, or overruns of a single byte
> -(off-by-one bugs).  Not all such errors can be protected against,
> -however, and memory leaks can result.
> +non-zero value less than 4, a special (less efficient) implementation is
> +used which is designed to be tolerant against simple errors, such as
> +double calls of @code{free} with the same argument, or overruns of a
> +single byte (off-by-one bugs).  Not all such errors can be protected
> +against, however, and memory leaks can result.
>  
>  Any detected heap corruption results in immediate termination of the
>  process.

Ok.

> diff --git a/manual/tunables.texi b/manual/tunables.texi
> index d5d957fb5b..ebdb562e36 100644
> --- a/manual/tunables.texi
> +++ b/manual/tunables.texi
> @@ -115,7 +115,7 @@ following tunables in the @code{malloc} namespace:
>  This tunable supersedes the @env{MALLOC_CHECK_} environment variable and is
>  identical in features.
>  
> -Setting this tunable to a non-zero value enables a special (less
> +Setting this tunable to a non-zero value less than 4 enables a special (less
>  efficient) memory allocator for the @code{malloc} family of functions that is
>  designed to be tolerant against simple errors such as double calls of
>  free with the same argument, or overruns of a single byte (off-by-one
> 

Ok.
diff mbox series

Patch

diff --git a/manual/memory.texi b/manual/memory.texi
index 28ec2e4e63..31ee36be8c 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -1364,11 +1364,11 @@  The block was already freed.
 Another possibility to check for and guard against bugs in the use of
 @code{malloc}, @code{realloc} and @code{free} is to set the environment
 variable @code{MALLOC_CHECK_}.  When @code{MALLOC_CHECK_} is set to a
-non-zero value, a special (less efficient) implementation is used which
-is designed to be tolerant against simple errors, such as double calls
-of @code{free} with the same argument, or overruns of a single byte
-(off-by-one bugs).  Not all such errors can be protected against,
-however, and memory leaks can result.
+non-zero value less than 4, a special (less efficient) implementation is
+used which is designed to be tolerant against simple errors, such as
+double calls of @code{free} with the same argument, or overruns of a
+single byte (off-by-one bugs).  Not all such errors can be protected
+against, however, and memory leaks can result.
 
 Any detected heap corruption results in immediate termination of the
 process.
diff --git a/manual/tunables.texi b/manual/tunables.texi
index d5d957fb5b..ebdb562e36 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -115,7 +115,7 @@  following tunables in the @code{malloc} namespace:
 This tunable supersedes the @env{MALLOC_CHECK_} environment variable and is
 identical in features.
 
-Setting this tunable to a non-zero value enables a special (less
+Setting this tunable to a non-zero value less than 4 enables a special (less
 efficient) memory allocator for the @code{malloc} family of functions that is
 designed to be tolerant against simple errors such as double calls of
 free with the same argument, or overruns of a single byte (off-by-one