Deutsch English Français Italiano |
<vrbqn4$2hm7q$1@raubtier-asyl.eternal-september.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Tue, 18 Mar 2025 13:59:23 +0100 Organization: A noiseless patient Spider Lines: 15 Message-ID: <vrbqn4$2hm7q$1@raubtier-asyl.eternal-september.org> References: <vpkmq0$21php$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 18 Mar 2025 13:59:16 +0100 (CET) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="6da780e47fc3ea84f7f8b65bcbd8be80"; logging-data="2676986"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/c/vUEw/zaM/ikXoFEfeoby+WyRkYR0Rc=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:3ghRp7FHWOzWbWt/QBNSWimiwDY= Content-Language: de-DE In-Reply-To: <vpkmq0$21php$1@dont-email.me> Bytes: 1766 Am 25.02.2025 um 16:15 schrieb Ar Rakin: > struct malloc_chunk > { > struct malloc_chunk *next; /* The next chunk. */ > struct malloc_chunk *prev; /* The previous chunk. */ > bool is_free; /* Whether this chunk is usable. */ > size_t size; /* The size of this chunk. */ > }; I prefer a memory allocator that only has a next-pointer per chunk. mimalloc() satisfies this constraint for the mostly used small block sizes as each block in a chain is power of two sized up to two pages. And if it's not in a chain it is allocated.