From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 28 10:06:15 2007 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90F0F16A469 for ; Fri, 28 Dec 2007 10:06:15 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-out-05.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 6E84513C457 for ; Fri, 28 Dec 2007 10:06:13 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-av-02.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-05.forthnet.gr (8.13.8/8.13.8) with ESMTP id lBS9tLG2011208; Fri, 28 Dec 2007 11:55:21 +0200 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-02.forthnet.gr (8.14.1/8.14.1) with ESMTP id lBS9tLJh012307; Fri, 28 Dec 2007 11:55:21 +0200 Received: from [192.168.136.22] (ppp116-79.adsl.forthnet.gr [193.92.81.79]) by MX-IN-04.forthnet.gr (8.14.2/8.14.2) with ESMTP id lBS9tIP5012304; Fri, 28 Dec 2007 11:55:20 +0200 Authentication-Results: MX-IN-04.forthnet.gr smtp.mail=dds@FreeBSD.org; spf=permerror Authentication-Results: MX-IN-04.forthnet.gr header.from=dds@FreeBSD.org; sender-id=permerror Message-ID: <4774C7FC.1080902@FreeBSD.org> Date: Fri, 28 Dec 2007 11:55:08 +0200 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Garrett Cooper References: <5950EE0C-383D-4D6B-9991-A0DEABD2ADE4@u.washington.edu> <7F9D2F63-B5E6-41DE-843A-8D673C2DC88E@u.washington.edu> In-Reply-To: <7F9D2F63-B5E6-41DE-843A-8D673C2DC88E@u.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: BSD license compatible hash algorithm? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 10:06:15 -0000 Garrett Cooper wrote: > On Dec 27, 2007, at 4:30 PM, Garrett Cooper wrote: > >> Hi all, >> Just wondering if anyone knew of a good BSD license compatible >> key-based hash placement / retrieval algorithm that was available >> anywhere. >> I'm looking for a reliable way to lookup objects to see if a given >> action would be performed in my revised pkg_install(1), to thus >> efficiently pre-plan out the installation dependencies and fully >> utilize multiprocessing capabilities of contemporary machines / >> eliminate duplicate dependency install requirements. >> I know I can use tree structures or hash(3), but I want to avoid >> trees (inefficient with large data sets of course) and I was looking >> for a non-BDB based solution (for right now, with this given structure >> as I don't want to write everything to disk). You can pass NULL as a file name to dbopen, and thereby not store the results permanently in a file. BDB will still use a temporary file internally, but this will be invisible to your users. Diomidis Spinellis - http://www.spinellis.gr