public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Use a precise bit count for the slab free items in UMA. Date: Fri, 24 Jun 2022 05:42:09 +0000 (GMT) [thread overview] Message-ID: <20220624054209.4CEC4384F015@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a6bd733db995ce9269e7654c67d2e57256a8d7c2 commit a6bd733db995ce9269e7654c67d2e57256a8d7c2 Author: Jeff Roberson <jeff@FreeBSD.org> Date: Mon Dec 2 22:44:34 2019 +0000 Use a precise bit count for the slab free items in UMA. This significantly shrinks embedded slab structures. Reviewed by: markj, rlibby (prior version) Differential Revision: https://reviews.freebsd.org/D22584 Diff: --- newlib/libc/sys/rtems/include/sys/bitset.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/bitset.h b/newlib/libc/sys/rtems/include/sys/bitset.h index cd70fd4f0..d119c23ca 100644 --- a/newlib/libc/sys/rtems/include/sys/bitset.h +++ b/newlib/libc/sys/rtems/include/sys/bitset.h @@ -249,10 +249,11 @@ #define BITSET_FSET(n) \ [ 0 ... ((n) - 1) ] = (-1L) +#define BITSET_SIZE(_s) (__bitset_words((_s)) * sizeof(long)) + /* * Dynamically allocate a bitset. */ -#define BITSET_ALLOC(_s, mt, mf) \ - malloc(__bitset_words(_s) * sizeof(long), mt, (mf)) +#define BITSET_ALLOC(_s, mt, mf) malloc(BITSET_SIZE((_s)), mt, (mf)) #endif /* !_SYS_BITSET_H_ */
reply other threads:[~2022-06-24 5:42 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220624054209.4CEC4384F015@sourceware.org \ --to=sh@sourceware.org \ --cc=newlib-cvs@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: linkBe 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).