From owner-freebsd-hackers Wed Sep 10 16:50:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA07714 for hackers-outgoing; Wed, 10 Sep 1997 16:50:13 -0700 (PDT) Received: from sendero-ppp.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id QAA07706 for ; Wed, 10 Sep 1997 16:50:10 -0700 (PDT) Received: (qmail 21099 invoked by uid 1000); 10 Sep 1997 23:50:31 -0000 Message-ID: X-Mailer: XFMail 1.2-alpha [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Date: Wed, 10 Sep 1997 16:50:31 -0700 (PDT) Organization: Atlas Telecom From: Simon Shapiro To: freebsd-hackers@freebsd.org Subject: /usr/include/sys How To question Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi Y'all, First, the story: I have a data structure that contains something like this in it: u_int32_t state_ref_count[DLM_STATE_BITS]; Now, instead of putting #define DLM_STATE_BITS in dlm.h, it is actually in sys/i386/conf/FOO as: options DLM_STATE_BITS=8 which then translates (according to sys/options, of course) to #define DLM_STATE_BITS 8 in /sys/compile/FOO/opt_dlm.h Why do that? if we need DLM_STATE_BITS to be only 8 instead of, say, 32, and we need 20,000 of these structures, the savings will be about 60KB. In reality the numbers are much higher. Now, the question: How do I integrate opt_dlm.h into sys/dlm.h so that it will reflect the proper sizing? If the kernel was built on the target machine, it is simple. If not, it can be nasty. Any suggestion is welcome. --- Sincerely Yours, (Sent on 10-Sep-97, 16:37:54 by XF-Mail) Simon Shapiro Atlas Telecom Senior Architect 14355 SW Allen Blvd., Suite 130 Beaverton OR 97005 Shimon@i-Connect.Net Voice: 503.643.5559, Emergency: 503.799.2313