<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ding-libs.git/dhash, branch master</title>
<subtitle>'D is not GLib' utility libraries [okos' clone]</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/'/>
<entry>
<title>DHASH: minor fixes</title>
<updated>2013-04-10T15:51:34+00:00</updated>
<author>
<name>Ondrej Kos</name>
<email>okos@redhat.com</email>
</author>
<published>2013-04-10T14:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=c1e2175844ffb99cd56da5859f5d197f122519a8'/>
<id>c1e2175844ffb99cd56da5859f5d197f122519a8</id>
<content type='text'>
https://fedorahosted.org/sssd/ticket/1877

fix coverity issue 11620

fix compilation warning (missing HI_STATE_0 in switch)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/sssd/ticket/1877

fix coverity issue 11620

fix compilation warning (missing HI_STATE_0 in switch)
</pre>
</div>
</content>
</entry>
<entry>
<title>DHASH: Don't use backward jumps</title>
<updated>2013-04-05T12:02:07+00:00</updated>
<author>
<name>Ondrej Kos</name>
<email>okos@redhat.com</email>
</author>
<published>2013-04-02T15:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=f8a80797c298f4ebe2dc2ebcb2327fa1f3a38905'/>
<id>f8a80797c298f4ebe2dc2ebcb2327fa1f3a38905</id>
<content type='text'>
https://fedorahosted.org/sssd/ticket/1855
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/sssd/ticket/1855
</pre>
</div>
</content>
</entry>
<entry>
<title>DHASH: Check before dereferencing</title>
<updated>2013-04-04T21:57:36+00:00</updated>
<author>
<name>Ondrej Kos</name>
<email>okos@redhat.com</email>
</author>
<published>2013-04-03T10:30:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=736ccbe7930f443d7d381d93d8cf89665345f36a'/>
<id>736ccbe7930f443d7d381d93d8cf89665345f36a</id>
<content type='text'>
https://fedorahosted.org/sssd/ticket/1858
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://fedorahosted.org/sssd/ticket/1858
</pre>
</div>
</content>
</entry>
<entry>
<title>Replacing sprintf with snprintf</title>
<updated>2013-01-24T07:34:40+00:00</updated>
<author>
<name>Dmitri Pal</name>
<email>dpal@redhat.com</email>
</author>
<published>2012-12-23T18:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=833a46e384828be48c27898e755d6215eb5c4bb8'/>
<id>833a46e384828be48c27898e755d6215eb5c4bb8</id>
<content type='text'>
Replaced sprintf in the unit test.
Defined constants for sizes and used them.
Wrpapped lines where noticed that they are longer than 80.
Added comments to the places where sprintf is still used
but it is safe to use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced sprintf in the unit test.
Defined constants for sizes and used them.
Wrpapped lines where noticed that they are longer than 80.
Added comments to the places where sprintf is still used
but it is safe to use.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing headers</title>
<updated>2013-01-24T07:34:37+00:00</updated>
<author>
<name>Dmitri Pal</name>
<email>dpal@redhat.com</email>
</author>
<published>2012-12-23T18:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=57faa64667411a3d8eeeeff62b1e659a94ed29cf'/>
<id>57faa64667411a3d8eeeeff62b1e659a94ed29cf</id>
<content type='text'>
Move GNU_SOUCE definition to configure.ac
Change all headers to use config.h.
Move config.h to the top.
Remove errno.h if it is not needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move GNU_SOUCE definition to configure.ac
Change all headers to use config.h.
Move config.h to the top.
Remove errno.h if it is not needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make CLANG happy</title>
<updated>2013-01-04T13:04:18+00:00</updated>
<author>
<name>Dmitri Pal</name>
<email>dpal@redhat.com</email>
</author>
<published>2012-12-23T20:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=e984e914b6aced5dabe250ad769c63186f21f8b8'/>
<id>e984e914b6aced5dabe250ad769c63186f21f8b8</id>
<content type='text'>
Address CLANG issues in the main code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Address CLANG issues in the main code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure error_string() never returns NULL</title>
<updated>2012-04-25T11:44:59+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2011-01-24T10:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=bc2f7c12c035d98e03341629c68f21c639386d91'/>
<id>bc2f7c12c035d98e03341629c68f21c639386d91</id>
<content type='text'>
A Coverity check indicated that ther are platforms where strerror() will
return NULL for unknown, e.g. negative error numbers. Chances are that
these platforms will have problems with NULL arguments to printf() too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A Coverity check indicated that ther are platforms where strerror() will
return NULL for unknown, e.g. negative error numbers. Chances are that
these platforms will have problems with NULL arguments to printf() too.
</pre>
</div>
</content>
</entry>
<entry>
<title>* Resolves: bug #735464 Fix the loop limit used to initialize the table directory, was based on count, now limited to segment_count.</title>
<updated>2012-04-25T11:43:22+00:00</updated>
<author>
<name>John Dennis</name>
<email>jdennis@redhat.com</email>
</author>
<published>2011-09-06T18:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=add869cb76e6ba1e3a16923faf83b68148e9278b'/>
<id>add869cb76e6ba1e3a16923faf83b68148e9278b</id>
<content type='text'>
* Do not pre-allocate all buckets based on requested table size. This
  defeats the point of a dynamic hash table which adjusts it's memory
  usage depending upon the number of items it holds. Pre-allocation
  also runs afoul of the table contraction logic, if the table is
  pre-allocated to a large size it will subsequently try to compact it
  negating the pre-allocation. Now the initial allocation is
  restricted to one directory segment (i.e. table-&gt;segment_count == 1)

* If the caller did not specify the directory_bits and segment_bits
  then compute them from the requested table size. The directory_size
  and segment_size must be powers of 2 to accmodate fast
  arithmetic. An optimal maximum number of buckets would be equal to
  the anticipated table size. If there were no collisions that would
  mean each item would be located in it's own bucket whose chain
  length is 1, the item would be immediatly found upon indexing into
  the bucket table.

* There is a requirment there be at least one directory
  segment, however contract_table() failed to enforce this
  requirement. Add a check to enforce the requirement.

* If hash_create() or hash_create_ex() failed it left the tbl
  parameter uninitialized but returned an error code. Now upon failure
  tbl is initialized to NULL as well as returning an error code.

* Clean up how the directory and segment sizes were computed. It had
  been using a loop and shifting 1 bit at a time, now it shifts all
  the bits in one operation and assures at least one directory and
  segment are allocated.

* In the event of an early exit from hash_create_ex() due to an error
  make sure all previously allocated resources are cleaned up by
  calling hash_destroy(). There was only one place this was
  missing. hash_destroy() blindly assumed the table had a directory,
  normally it would unless hash_destroy was called due to an early
  exit in hash_create_ex(). Modify hash_destroy() to check for the
  existence of the directory before cleaning up the directory
  contents.

* Update the function documentation in dhash.h to explain each
  parameter of hash_create() and hash_create_ex().

* Enhance dhash_test.c
  - To output the random seed used to intialize the random number
    generator and add command line option to set the random seed. This
    permits recreating a failed test run.
  - Add command line parameter to set the initial table size.
  - Use proper string to long conversion routines when reading command
    line parameters (e.g. strtoul() instead of atoi())
  - Add logic to make sure each test value is unique.

* Add additional information to the debug output to show the computed
  directory_bits, segment_bits, sizes, etc.

* Adjust the debug_level conditionals to be less verbose.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Do not pre-allocate all buckets based on requested table size. This
  defeats the point of a dynamic hash table which adjusts it's memory
  usage depending upon the number of items it holds. Pre-allocation
  also runs afoul of the table contraction logic, if the table is
  pre-allocated to a large size it will subsequently try to compact it
  negating the pre-allocation. Now the initial allocation is
  restricted to one directory segment (i.e. table-&gt;segment_count == 1)

* If the caller did not specify the directory_bits and segment_bits
  then compute them from the requested table size. The directory_size
  and segment_size must be powers of 2 to accmodate fast
  arithmetic. An optimal maximum number of buckets would be equal to
  the anticipated table size. If there were no collisions that would
  mean each item would be located in it's own bucket whose chain
  length is 1, the item would be immediatly found upon indexing into
  the bucket table.

* There is a requirment there be at least one directory
  segment, however contract_table() failed to enforce this
  requirement. Add a check to enforce the requirement.

* If hash_create() or hash_create_ex() failed it left the tbl
  parameter uninitialized but returned an error code. Now upon failure
  tbl is initialized to NULL as well as returning an error code.

* Clean up how the directory and segment sizes were computed. It had
  been using a loop and shifting 1 bit at a time, now it shifts all
  the bits in one operation and assures at least one directory and
  segment are allocated.

* In the event of an early exit from hash_create_ex() due to an error
  make sure all previously allocated resources are cleaned up by
  calling hash_destroy(). There was only one place this was
  missing. hash_destroy() blindly assumed the table had a directory,
  normally it would unless hash_destroy was called due to an early
  exit in hash_create_ex(). Modify hash_destroy() to check for the
  existence of the directory before cleaning up the directory
  contents.

* Update the function documentation in dhash.h to explain each
  parameter of hash_create() and hash_create_ex().

* Enhance dhash_test.c
  - To output the random seed used to intialize the random number
    generator and add command line option to set the random seed. This
    permits recreating a failed test run.
  - Add command line parameter to set the initial table size.
  - Use proper string to long conversion routines when reading command
    line parameters (e.g. strtoul() instead of atoi())
  - Add logic to make sure each test value is unique.

* Add additional information to the debug output to show the computed
  directory_bits, segment_bits, sizes, etc.

* Adjust the debug_level conditionals to be less verbose.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a typo in dhash.h</title>
<updated>2010-10-21T15:07:22+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2010-10-21T14:14:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=ee1479c56b5594ad673f4a724cd2a95e4c9e337b'/>
<id>ee1479c56b5594ad673f4a724cd2a95e4c9e337b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>dhash: Allow hash_enter() to update entries</title>
<updated>2010-10-12T18:26:07+00:00</updated>
<author>
<name>Sumit Bose</name>
<email>sbose@redhat.com</email>
</author>
<published>2010-09-29T10:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/okos/public_git/ding-libs.git/commit/?id=8a5a0c340cb259103abc77d37960710177a74f8c'/>
<id>8a5a0c340cb259103abc77d37960710177a74f8c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
