Re: spamprobe-1.1x7 released
Brian Burton <[email protected]>
| Newsgroups | gmane.mail.spam.spamprobe.general |
|---|---|
| Message-ID | <[email protected]> |
Jacob S wrote: > On Wed, 30 Mar 2005 10:12:53 -0500 > Brian Burton <[email protected]> wrote: >>The record size in a hash database should be the same on 64 bit >>processors as it is on 32 bit processors. I haven't tested that >>though since I don't have a 64 bit system to test on. >> >>A great test to run would be to build a hash database on a 32 bit >>system, export that to a file, import that file into a database on a >>64 bit system, export on that 64 bit system to a new file and then >>diff the two export files. They should be identical. > > hmm... I was thinking previously (with PBL) the size difference was only > noticed when doing a du/ls -l on the db. When exported to a text file, > both dbs were the same size. Is there something different about hashing > that I don't know about, or is this a case where I don't know anything > and should keep quiet? :-) You are correct that on PBL and BDB the record size would be different on a 64 bit CPU because I wrote records using the native word size. Basically I took a struct and wrote all of its bits directly so if a long was 8 bytes instead of 4 the record size would double. The hash is different since its whole reason for existence is to minimize disk space consumption. With the hash format I have code that explicitly writes a fixed number of bytes for each record. The hash file code assumes that records have a fixed size independent of word size on the machine SP is running on. I think I got that code right but I can't test it here. The test I outlined was to verify that I don't have a bug which might corrupt the hash file on 64 bit CPUs. Thanks, ++Brian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click