mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jack Bond-Preston <jack.bond-preston@arm.com>
To: musl@lists.openwall.com
Subject: Re: [musl] Mallocng algorithm high-level overview
Date: Mon, 4 Oct 2021 15:24:28 +0100	[thread overview]
Message-ID: <f61beeff-c8e3-a088-07f6-1907ebf6b883@arm.com> (raw)
In-Reply-To: <20210930162455.GF4428@brightrain.aerifal.cx>

Thanks for the reply Rich, it has been a great help.

I have a couple more specific questions, sorry:
- Am I correct in saying IB represents the size (in bytes) of the
in-band metadata between slots?
- Is it assumed that sizeof(struct group) == sizeof(UNIT) throughout the
code (the struct is defined such that this is true)? If the size of the
in-band metadata were to increase (due to additional/larger metadata)
such that UNIT < sizeof(struct group) (due to the size of the group
struct needing to increase to accommodate the larger in-band metadata),
I assume some code would have to be changed to instead use the size of
the new group struct where appropriate (e.g. when allocating some new
group). I noticed there are a lot of expressions containing x +
UNIT/UNIT + x, are these generally to ensure allocations etc. include
enough space for the contents of the group struct, or are there other
reasons for these (e.g. some kind of 1-UNIT buffer between slots)?

Cheers,
Jack

  reply	other threads:[~2021-10-04 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 14:02 Jack Bond-Preston
2021-09-30 14:50 ` Fangrui Song
2021-09-30 15:35   ` Jack Bond-Preston
2021-09-30 16:24 ` Rich Felker
2021-10-04 14:24   ` Jack Bond-Preston [this message]
2021-10-04 15:28     ` Rich Felker

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=f61beeff-c8e3-a088-07f6-1907ebf6b883@arm.com \
    --to=jack.bond-preston@arm.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).