Subject: bin/35130: gpt(8) could have a smaller footprint
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <jakllsch@kollasch.net>
List: netbsd-bugs
Date: 11/26/2006 18:10:00
>Number: 35130
>Category: bin
>Synopsis: gpt(8) has a larger-than-necessary CRC32 table
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Nov 26 18:10:00 +0000 2006
>Originator: Jonathan A. Kollasch
>Release: -current
>Environment:
System: NetBSD kirkkit.kollasch.net 3.0 NetBSD 3.0 (KIRKKIT) #2: Mon Oct 16 21:27:42 CDT 2006 root@kirkkit.kollasch.net:/usr/src/sys/arch/i386/compile/KIRKKIT i386
Architecture: i386
Machine: i386
>Description:
CRC32 tables don't need to be huge.
>How-To-Repeat:
Notice that there is this huge CRC32 table in src/sbin/gpt/gpt.c,
and that a version that uses more run-time code would be a un-noticable
performance decrease.
>Fix:
Use the CRC32 code from src/sys/dev/dkwedge/dkwedge_gpt.c in src/sbin/gpt/gpt.c
Or, better yet, do something like put this in a library of some kind,
and share it in between user and kernel land.