Date: Fri, 05 Mar 1999 19:21:01 +0800 From: Jarvis Cochrane <jarvis@guru.wow.aust.com> To: lbruno@cmp.com Cc: "freebsd-advocacy@FreeBSD.ORG" <freebsd-advocacy@FreeBSD.ORG> Subject: Re: Technical questions about BSD Message-ID: <36DFBDE6.C96533C5@guru.wow.aust.com> References: <8525672A.0029E66C.00@NotesSMTP-01.cmp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Lee, An answer to another of your questions... > > First, I am > > curious to know how many thousands of lines of code make up the BSD kernel? I counted lines of code by running the following commands in the /usr/src/sys directory - the source code for the FreeBSD kernel (Version 2.2.8, BTW). wc -l `find ./ -name "*.c" -print` gives 525,527 lines of 'c' code, including comments wc -l `find ./ -name "*.h" -print` gives 108,923 lines of C header files, including comments. wc -l `find ./ -name "*.s" -print` gives 8,562 lines of assembly language files, including comments. So the kernel sources for FreeBSD 2.2.8 total some 644,012 lines of code and comments. Adding to that, the kernel code _may_ (I haven't checked this) compile some standard C library functions into the code, which would increase the number of lines of code in the kernel. However, I think it would be very rare for a production kernel to be configured to contain all of the available device drivers and options available, using less code and making the resulting kernel smaller. For example, the 2.2.8 'GENERIC' kernel is 1,601,351 bytes on my system. My custom configured kernel is only 984,922 bytes - 61% of the size. This is probably _way_ more detail than you needed! Lets just call it 650 thousand lines of code! Jarvis To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-advocacy" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36DFBDE6.C96533C5>