From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 19:13:55 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B475106564A for ; Tue, 25 Nov 2008 19:13:55 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from canonware.com (canonware.com [64.183.146.166]) by mx1.freebsd.org (Postfix) with ESMTP id 324F28FC1B for ; Tue, 25 Nov 2008 19:13:55 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from [192.168.168.201] (unknown [192.168.168.201]) by canonware.com (Postfix) with ESMTP id C204B129825; Tue, 25 Nov 2008 10:54:49 -0800 (PST) Message-ID: <492C48E2.4020108@FreeBSD.org> Date: Tue, 25 Nov 2008 10:50:10 -0800 From: Jason Evans User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Channa References: <515c64960811240359r34ec4c46iee7a5f8b88cfa9e@mail.gmail.com> In-Reply-To: <515c64960811240359r34ec4c46iee7a5f8b88cfa9e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: jemalloc design. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 19:13:55 -0000 Channa wrote: > With small allocations i wanted to know how the bins are arranged?? > The sentence from the above pdf : "Small allocations are segregated > such that each run manages a single size class" > means that all the memory regions for > eg: of size 4KB are maintained as a single run in the form of red black tree? The quoted text is talking about small objects, which are packed together in run objects. All small objects within each particular run are of the same size class. So, one run may contain an array of 16-byte objects, another may contain an array of 24-byte objects, and so on. The small objects within each run are tracked by bitmaps at the beginning of each run. Page runs are tracked by red-black trees. Jason