From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6634 invoked from network); 30 Sep 2021 14:02:41 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 30 Sep 2021 14:02:41 -0000 Received: (qmail 32431 invoked by uid 550); 30 Sep 2021 14:02:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32395 invoked from network); 30 Sep 2021 14:02:36 -0000 To: musl@lists.openwall.com From: Jack Bond-Preston Message-ID: <36151c4f-872f-7f84-0402-8491234ea62a@arm.com> Date: Thu, 30 Sep 2021 15:02:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: [musl] Mallocng algorithm high-level overview Hello, I'm currently working on porting mallocng to a new architecture and could use some assistance understanding the algorithm. From searching the web, I couldn't seem to find any high-level overview of musl's mallocng allocator (save for the readme at github/richfelker /mallocng-draft, which is a little briefer than what I am looking for). If any such description exists, I would much appreciate being pointed towards it. If not, would anyone be able to explain some of the details of the allocator? Mostly I am interested in a more general high-level overview of how the allocator works. There are also some specifics I am interested in, if anyone is able to shine some light on these: - The uses/purposes of the structures in meta.h. Particularly, meta and group, and the relation between the two. - The general overview of in-band and out-of-band metadata, and how/ when they are used. - The purpose/meaning of the UNIT define in meta.h. - Any assumptions about alignment/pointer size the allocator may make. Thanks very much for your time, I appreciate the request is a bit broad, but any information is appreciated. Please don't hesitate to reach out for more information. Cheers, Jack