From: Andreas Schwab <schwab@linux-m68k.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: libc-alpha@sourceware.org, fweimer@redhat.com, carlos@redhat.com
Subject: Re: [PATCH 1/4] Add framework for tunables
Date: Mon, 06 Feb 2017 22:36:00 -0000 [thread overview]
Message-ID: <87y3xjc5gd.fsf@linux-m68k.org> (raw)
In-Reply-To: <1483070938-2308-2-git-send-email-siddhesh@sourceware.org> (Siddhesh Poyarekar's message of "Fri, 30 Dec 2016 09:38:55 +0530")
On Dez 30 2016, Siddhesh Poyarekar <siddhesh@sourceware.org> wrote:
> diff --git a/malloc/arena.c b/malloc/arena.c
> index eed4247..234035f 100644
> --- a/malloc/arena.c
> +++ b/malloc/arena.c
> @@ -19,6 +19,11 @@
>
> #include <stdbool.h>
>
> +#if HAVE_TUNABLES
> +# define TUNABLE_NAMESPACE malloc
> +#endif
> +#include <elf/dl-tunables.h>
> +
> /* Compile-time constants. */
>
> #define HEAP_MIN_SIZE (32 * 1024)
> @@ -204,6 +209,34 @@ __malloc_fork_unlock_child (void)
> __libc_lock_init (list_lock);
> }
>
> +#if HAVE_TUNABLES
> +static inline int do_set_mallopt_check (int32_t value);
> +void
> +DL_TUNABLE_CALLBACK (set_mallopt_check) (void *valp)
> +{
> + int32_t value = *(int32_t *) valp;
This is wrong. The callback receives a pointer to tunable_val_t.
> + do_set_mallopt_check (value);
> + if (check_action != 0)
> + __malloc_check_init ();
> +}
> +
> +# define DL_TUNABLE_CALLBACK_FNDECL(__name, __type) \
> +static inline int do_ ## __name (__type value); \
> +void \
> +DL_TUNABLE_CALLBACK (__name) (void *valp) \
> +{ \
> + __type value = *(__type *) valp; \
Likewise.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2017-02-06 22:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-30 4:09 [PATCH v7 0/4] glibc tunables Siddhesh Poyarekar
2016-12-30 4:09 ` [PATCH 2/4] Initialize tunable list with the GLIBC_TUNABLES environment variable Siddhesh Poyarekar
2016-12-30 9:50 ` Florian Weimer
2016-12-30 4:09 ` [PATCH 4/4] User manual documentation for tunables Siddhesh Poyarekar
2016-12-30 9:50 ` Florian Weimer
2016-12-31 12:40 ` Siddhesh Poyarekar
2016-12-30 4:09 ` [PATCH 3/4] Enhance --enable-tunables to select tunables frontend at build time Siddhesh Poyarekar
2016-12-30 14:55 ` Joseph Myers
2016-12-30 4:09 ` [PATCH 1/4] Add framework for tunables Siddhesh Poyarekar
2017-02-06 22:36 ` Andreas Schwab [this message]
2017-02-07 6:49 ` Siddhesh Poyarekar
2017-02-07 16:06 ` Andreas Schwab
2017-02-08 8:48 ` Siddhesh Poyarekar
2017-02-06 22:59 ` Andreas Schwab
-- strict thread matches above, loose matches on Subject: below --
2016-12-31 15:41 [PATCH v8 0/4] glibc tunables Siddhesh Poyarekar
[not found] ` <1483198831-2232-2-git-send-email-siddhesh@sourceware.org>
2016-12-31 16:49 ` [PATCH 1/4] Add framework for tunables Florian Weimer
2016-12-31 17:58 ` Siddhesh Poyarekar
2016-12-31 19:43 ` Florian Weimer
2016-12-31 19:50 ` Siddhesh Poyarekar
2016-12-31 19:52 ` Florian Weimer
2017-01-01 13:40 ` Nix
2016-11-16 8:35 [PATCHv6 0/4] glibc tunables Siddhesh Poyarekar
2016-11-16 8:35 ` [PATCH 1/4] Add framework for tunables Siddhesh Poyarekar
2016-12-27 11:08 ` Florian Weimer
2016-12-27 20:59 ` Siddhesh Poyarekar
2016-12-27 21:12 ` Florian Weimer
2016-12-27 21:25 ` Siddhesh Poyarekar
2016-12-30 13:28 ` Joseph Myers
2016-12-31 13:48 ` Siddhesh Poyarekar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3xjc5gd.fsf@linux-m68k.org \
--to=schwab@linux-m68k.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).