From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 13:09:08 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 9B59C1065675 for ; Wed, 26 Nov 2008 13:09:08 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.185]) by mx1.freebsd.org (Postfix) with ESMTP id 496448FC14 for ; Wed, 26 Nov 2008 13:09:08 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: by rn-out-0910.google.com with SMTP id j71so422442rne.12 for ; Wed, 26 Nov 2008 05:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Bdre27D2ayAtz1AFgzU6l+91BQSOQ/hHQzFzmvZyvI0=; b=KhU24Tjsy5kLKS9sp3Pxc38qLMiyz+W9yonCqgutqcBI31+IWiQdIXRCW04yV5ERyK G+1HHxfFBr8ikCvbp8f+5P7U8p568ueRGX2ZNLxIQQUGYT2X9WfIxBgdIp1EAr5O+1FQ GcDLTGVAYETeLTPgRiErem61JD1N2WPIk3xHU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=s7uq6WjFbWMG/5kwqaayJ6Wtr9lVmxdh7Iv6CQug/DEKbgnbwC+brMOdcyYb3lVeFo gEPE7lBc8sTnVXAvwzNfZYLaBubqQhHtq18KrjEvz3QvzzcKglbUsxq5I58pE8DEyoTK xpzM25k5XjoTywcEgyRoo2ZWz+64cYII3kCj0= Received: by 10.65.197.16 with SMTP id z16mr6126997qbp.25.1227704946700; Wed, 26 Nov 2008 05:09:06 -0800 (PST) Received: by 10.64.156.4 with HTTP; Wed, 26 Nov 2008 05:09:06 -0800 (PST) Message-ID: <515c64960811260509q7c83b919o93c0ddfdb6941c04@mail.gmail.com> Date: Wed, 26 Nov 2008 18:39:06 +0530 From: Channa To: "Jason Evans" In-Reply-To: <492C48E2.4020108@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <515c64960811240359r34ec4c46iee7a5f8b88cfa9e@mail.gmail.com> <492C48E2.4020108@FreeBSD.org> 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: Wed, 26 Nov 2008 13:09:08 -0000 Hi, Thank you very much for the response. I have a small doubt as you mentioned "All small objects within each particular run are of the same size class" This "run" is inturn a tree ? And for different size classes different trees are maintained or there is only one tree root? I am just trying to understand the code so some doubts. If could clarify some of these doubts it will be great help for me. Also i have just ported it to my own library where i checked the performace of jemalloc on a single processor system. I observed the performance of linux malloc is good. I have commented all the debug options in the jemalloc code. The mailing list discussion below gives more details. http://www.nabble.com/FreeBSD-performance-on-single-CPU.-td20581044.html Please help me in this regard. Thanks in Advance, Channa 2008/11/26 Jason Evans : > 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 >