apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56679] New: apr_hash: Allow specification of the initial max size during creation
Date Sat, 28 Jun 2014 06:28:23 GMT

            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
- 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

View raw message