You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2014/06/28 08:28:23 UTC
[Bug 56679] New: apr_hash: Allow specification of the initial max
size during creation
https://issues.apache.org/bugzilla/show_bug.cgi?id=56679
Bug ID: 56679
Summary: apr_hash: Allow specification of the initial max size
during creation
Product: APR
Version: 1.5.1
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: APR
Assignee: bugs@apr.apache.org
Reporter: richard_fujiyama@hotmail.com
Created attachment 31758
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31758&action=edit
Implements apr_hash_make_custom2, apr_hash_buckets, and related tests.
Allow creation of an apr_hash with a user provided initial value for ht->max to
avoid multiple reallocations for larger hash tables.
The attached patch:
- adds a new initializtion function, apr_hash_make_custom2
- reimplements apr_hash_make and apr_hash_make_custom using
apr_hash_make_custom2 to remove duplicated code
- adds a helper function, apr_hash_buckets, which reports the length of the
backing array. This is used for testing.
- adds new tests to test/testhash.c that cover both apr_hash_make_custom2 and
apr_hash_buckets
- is made with svn diff against apr 1.6.x branch
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org