Re: Hash collision vectors in APR?

2012-01-26 Thread Branko Čibej
On 06.01.2012 00:05, Bojan Smojver wrote: On Fri, 2012-01-06 at 09:48 +1100, Bojan Smojver wrote: The apr_hashfunc_t function prototype would then most likely have to change. We'd probably need to pass the hash itself into it, which would then hold the per-hash seed. Right? Actually, that

Re: svn commit: r1231605 - /apr/apr/trunk/tables/apr_hash.c

2012-01-26 Thread Ruediger Pluem
Bojan Smojver wrote: On Thu, 2012-01-26 at 09:05 +1100, Bojan Smojver wrote: Will fix. Better? Yes. No more regression in httpd and APR tests pass as well. Regards Rüdiger

Re: Hash collision vectors in APR?

2012-01-26 Thread Bojan Smojver
--- Original message --- From: Branko Čibej - hash = ht-hash_func(key, klen); + hash = randomize_hash(ht, ht-hash_func(key, klen); Completely private change that leaves hash_func_t unchanged. Interesting approach. So, randomize_hash() would then perturb (xor or something) what the

Re: Hash collision vectors in APR?

2012-01-26 Thread Branko Čibej
On 26.01.2012 12:15, Bojan Smojver wrote: --- Original message --- From: Branko Čibej - hash = ht-hash_func(key, klen); + hash = randomize_hash(ht, ht-hash_func(key, klen); Completely private change that leaves hash_func_t unchanged. Interesting approach. So, randomize_hash()

Re: Hash collision vectors in APR?

2012-01-26 Thread Bojan Smojver
--- Original message --- From: Branko Čibej Correct. I intentionally left out the implementation, since i don't really have an opinion about how it should be done. I just wanted to point out that there's a simple way to add per-table randomization without changing any of the existing

SPSC queue in APR/HTTPD?

2012-01-26 Thread sridhar basam
I see there is a generic thread safe fifo queue implemented in apr-util. Anyone aware of a single producer single consumer queue implementation in either the APR or HTTPD projects? thanks, SRidhar

Link error with APR

2012-01-26 Thread sidinsd
I have a C++ project in Visual Studio that I am using APR with. When I link the project I get the following error message. 1LINK : fatal error LNK1104: cannot open file 'aprapp-1.libkernel32.lib' I tried searching for this library in the APR directories and I could not find it anywhere.

Re: Hash collision vectors in APR?

2012-01-26 Thread Bojan Smojver
On Fri, 2012-01-27 at 00:36 +1100, Bojan Smojver wrote: Thanks, will implement. Attached. If nobody comes up with regressions or other problems with this approach, I'll commit it to trunk. Thanks everyone for their input. -- Bojan Index: tables/apr_hash.c

Re: Link error with APR

2012-01-26 Thread Eric Covener
On Thu, Jan 26, 2012 at 4:46 PM, sidinsd sid.schip...@ga.com wrote: I have a C++ project in Visual Studio that I am using APR with. When I link the project I get the following error message.       1LINK : fatal error LNK1104: cannot open file 'aprapp-1.libkernel32.lib' Missing a space in

Re: Link error with APR

2012-01-26 Thread sidinsd
Yes, you are a genius! I was missing a semi-colon separating the two library names. Thank you. Eric Covener wrote: On Thu, Jan 26, 2012 at 4:46 PM, sidinsd sid.schip...@ga.com wrote: I have a C++ project in Visual Studio that I am using APR with. When I link the project I get the