From owner-freebsd-questions@FreeBSD.ORG Thu Oct 19 16:24:08 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD4DF16A407 for ; Thu, 19 Oct 2006 16:24:08 +0000 (UTC) (envelope-from Leidecker@stud.uni-heidelberg.de) Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B2ED43D5F for ; Thu, 19 Oct 2006 16:24:05 +0000 (GMT) (envelope-from Leidecker@stud.uni-heidelberg.de) Received: from ix.urz.uni-heidelberg.de (cyrus1.urz.uni-heidelberg.de [129.206.119.235]) by relay2.uni-heidelberg.de (8.12.10/8.12.10) with ESMTP id k9JGO2e0008518 for ; Thu, 19 Oct 2006 18:24:02 +0200 (MET DST) Received: from wwwmail.urz.uni-heidelberg.de (wwwmail.urz.uni-heidelberg.de [129.206.100.145]) by ix.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id SAA7971026 for ; Thu, 19 Oct 2006 18:24:00 +0200 From: Leidecker@stud.uni-heidelberg.de Received: from wwwmail.urz.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by wwwmail.urz.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id k9JGNxmA002288 for ; Thu, 19 Oct 2006 18:23:59 +0200 Received: (from apache@localhost) by wwwmail.urz.uni-heidelberg.de (8.13.1/8.13.1/Submit) id k9JGNxcD002287 for freebsd-questions@freebsd.org; Thu, 19 Oct 2006 18:23:59 +0200 Received: from 194.193.169.242 ([194.193.169.242]) by wwwmail.urz.uni-heidelberg.de (Horde MIME library) with HTTP; Thu, 19 Oct 2006 18:23:59 +0200 Message-ID: <20061019182359.2jje9s9uok844k8w@wwwmail.urz.uni-heidelberg.de> Date: Thu, 19 Oct 2006 18:23:59 +0200 To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-Mailman-Approved-At: Thu, 19 Oct 2006 21:04:49 +0000 Subject: chunk size X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 16:24:08 -0000 Hi there, I ran into trouble with memory allocation in freebsd. In Linux, informations on heap chunks are stored with the actual data. That's why a chunks' size is four bytes before the raw data. Let's say, there is memory allocated at address 0x0804b000. In Linux, that would return me the number allocated bytes: (gdb) x/x 0x0804b000-4 FreeBSD uses another malloc alternative where the data and the informations are splitted into two lists. The informations on sizes are stored in a page direcory list. Entries of that list point to their corresponding page with the data. My question is now, regarding on the usage of gdb: How can I find out, of what size a chunk is? Or, where do I find the page direcory list? regards, Nico