From owner-cvs-src@FreeBSD.ORG Thu Dec 18 13:47:15 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC3C916A4CE; Thu, 18 Dec 2003 13:47:15 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E081E43D36; Thu, 18 Dec 2003 13:47:14 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id hBILlE0B076015; Thu, 18 Dec 2003 13:47:14 -0800 (PST) (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id hBILlEwY076014; Thu, 18 Dec 2003 13:47:14 -0800 (PST) (envelope-from wpaul) Message-Id: <200312182147.hBILlEwY076014@repoman.freebsd.org> From: Bill Paul Date: Thu, 18 Dec 2003 13:47:14 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/ndiscvt ndiscvt.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2003 21:47:15 -0000 wpaul 2003/12/18 13:47:14 PST FreeBSD src repository Modified files: usr.sbin/ndiscvt ndiscvt.c Log: Make ndiscvt(8) emit the binary image array as inline assembly code rather than a char array. Emitting the data as a big char array works fine in the typical case, where a .sys file may be ~50K in size. Unfortunately, some .sys files can be several hundred Kbytes in size, or even several megabytes in size. One extreme case is the Intel centrino wireless driver, which is 2.4MB. This causes us to emit an ndis_driver_data.h file that's on the order of 15MB in size, and gcc consumes enormous amounts of virtual memory while trying to compile it. On my laptop, with 128MB of RAM and 256MB of swap space, gcc consumed all available VM and crashed without being able to compile if_ndis.o. By emitting the array as assembler, we bypass the C compiler and consume much less memory. I was able to easily test compile if_ndis.ko with the centrino driver on my laptop after this change. This is merely a convenience, and should not have any operational effect on the NDISulator itself. Revision Changes Path 1.3 +16 -8 src/usr.sbin/ndiscvt/ndiscvt.c