From owner-freebsd-questions@freebsd.org Mon Dec 7 18:04:21 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBB004B0581 for ; Mon, 7 Dec 2020 18:04:21 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [174.136.98.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqWR85XSfz3LKJ for ; Mon, 7 Dec 2020 18:04:20 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from [192.168.1.160] (cpe-24-24-163-126.socal.res.rr.com [24.24.163.126]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id b8eae9cb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 7 Dec 2020 18:04:12 +0000 (UTC) Subject: Re: Jemalloc and FreeBSD question To: Valerio Besozzi , "freebsd-questions@freebsd.org" References: From: Pete Wright Message-ID: <9c2403f9-881d-8636-4714-5aefb56f2234@nomadlogic.org> Date: Mon, 7 Dec 2020 10:04:12 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4CqWR85XSfz3LKJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 174.136.98.114 as permitted sender) smtp.mailfrom=pete@nomadlogic.org X-Spamd-Result: default: False [-3.30 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[nomadlogic.org]; ARC_NA(0.00)[]; SPAMHAUS_ZRD(0.00)[174.136.98.114:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[174.136.98.114:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 18:04:21 -0000 On 12/7/20 3:49 AM, Valerio Besozzi wrote: > Hi, > I'm writing my CS thesis about various memory allocator. I found various resources about jemalloc but I think some of these are old. I wanted to kindly ask if you could give me some information regarding malloc()/free()/realloc(). > I already contacted the developers on the official gitter and they provided me useful resources but I was wondering since this allocator is also used on FreeBSD (since this is practically where it was born), if someone more experienced than me could give me some explanations regarding the implementation of these functions. > Also, any anecdotes about the history of this allocator and FreeBSD would be greatly appreciated. I am sure the are other places to look but this is pretty much *the* resource I use when I need to understand how FreeBSD is implemented: https://www.oreilly.com/library/view/the-design-and/9780133761825/ While I may not dive into jemalloc vs other alocators it does cover all the internals of FreeBSD in very well written prose. -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA