From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 05:23:30 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E46216A4CE; Mon, 12 Jul 2004 05:23:30 +0000 (GMT) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1601743D62; Mon, 12 Jul 2004 05:23:30 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i6C5NSVq030966; Mon, 12 Jul 2004 01:23:29 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040712045053.GY95729@elvis.mu.org> References: <20040712041539.GW95729@elvis.mu.org> <20040712045053.GY95729@elvis.mu.org> Date: Mon, 12 Jul 2004 01:23:28 -0400 To: Alfred Perlstein , current@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: nevermind Re: allocating a spare from kinfo_proc. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 12 Jul 2004 05:23:30 -0000 At 9:50 PM -0700 7/11/04, Alfred Perlstein wrote: >Sorry, got this done now. > >tested on sparc64, alpha and i386. > >* Alfred Perlstein [040711 21:15] wrote: >> I would like to allocate a void * "user pointer" from struct >> kinfo_proc. >> > > This is for convience of programs that want to retrieve a > > kinfo_proc but also compute some information and hang it > > from the kinfo proc. Fwiw, /bin/ps does this by creating it's own struct which has a 'struct kinfo_proc' as one variable inside of it. However, this means that `ps' has to copy all the kinfo_proc's that the kernel returns into an array of these other structs. Depending on what the program is doing with those kinfo_proc's, this new variable would probably make more sense. > > Are there any guidelines for adjusting this struct that I > > should be aware of? It would be nice to make sure that alignment issues are not wasting space on *any* of the platforms. When I made my recent changes to user.h, I had a program which printed out all the variables and their alignments. If I have time this week I will update that program and see what it says on the different hardware platforms. > > Can anyone do it for me? > > > > thank you! -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu