From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 28 19:35:44 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEAA7BCF; Mon, 28 Jul 2014 19:35:44 +0000 (UTC) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [IPv6:2607:f8b0:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A760280F; Mon, 28 Jul 2014 19:35:44 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id hq11so11968605vcb.16 for ; Mon, 28 Jul 2014 12:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nHhcB/8wcRvcD/GylWH7544IlcbdQv3UjuCiD2Kuv5M=; b=LJL/QPv3FGAKIJyQli/sfAI3V7JwOAH2G9JEAo74Hv+aOmmBkIPm64guCLZv6TSvN2 5q+aRufKiYX4XZFmyXtV+JS9wfSXr+NjxWqz+Go8Gc+tX8/WkSawPurNZN9ufbjTJI+d Vq/1V+q3/32v0sF7q4O903OqPVJKNMGVDcMDdDca56ztUfBYE91yPsdpAWaaKqPuIZLi 0/y4gEoOblU7pNeyuoIxgYWH4mi1FlbWVDYml2jQKjEbZBdvCcfNeLu2i0BEg+gY1PaJ edbhIDEB9PIu2VZxK9gLla4+JoAZKQhSPMrZrNt3nrUhQknrUsJEJIvCqEm50aoZ3BF0 NdWg== MIME-Version: 1.0 X-Received: by 10.52.101.168 with SMTP id fh8mr40002588vdb.34.1406576143453; Mon, 28 Jul 2014 12:35:43 -0700 (PDT) Received: by 10.220.192.68 with HTTP; Mon, 28 Jul 2014 12:35:43 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Jul 2014 15:35:43 -0400 Message-ID: Subject: Re: Allocation/free history From: suresh gumpula To: Adrian Chadd X-Mailman-Approved-At: Mon, 28 Jul 2014 19:58:44 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2014 19:35:44 -0000 I am talking about kernel space Chadd. Thanks Suresh On Mon, Jul 28, 2014 at 3:20 PM, Adrian Chadd wrote: > Hi! > > Are you talking about userland? kernel? both? > > > -a > > > On 28 July 2014 10:40, suresh gumpula wrote: > > Hi, > > Knowing the PC of an allocation is very usefull in debugging. Having > the > > PC hash table and storing the pc hash either with an object itself( at > the > > end) or allocate an exra structure to hold the > > hash index help us find out who/where an object was allocated. We > > already have something like this in our own operating system and has > been a > > useful thing in debugging. > > BSD allocator uses power of 2, so storing at the end of an object might > be > > wasting lot of memory with large objects. > > > > It appears we don=E2=80=99t have something like this in current FBSD co= deline and > > would like to work on this ? Any comments please? > > > > > > It would be something like below. 8 bytes at the end of each object has > > fecepost which is usefull in finding overwrites and 2 hash indices to t= he > > PC table to track allocation history. > > (kgdb-amd64-7.4-87) x/40w 0xffffff153728b038 > > 0xffffff153728b038: 0xf6970a05 0x06cb7e0c 0x305a134a > > 0x831c18bb > > 0xc0000bed 0x134a2115 > > > > 0xffffff153728b050: 0x85687ef8 0xffffffff 0x00000001 > > 0x83192201 > > 0xc0000bed 0x1741143b > > > > Thanks > > Suresh > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to " > freebsd-hackers-unsubscribe@freebsd.org" >