diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2013-01-17 14:18:26 -0500 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2013-01-17 14:18:26 -0500 |
commit | 1b5ba8e022836fa8ab93bc90df1b34a29ea6e134 (patch) | |
tree | e2a832468ccbf52965f18c37b3c4e692fe97ed06 /src/hash.c | |
parent | 487e15dc239ccdb3344d1c99ce120e872bab4a74 (diff) |
Imported Upstream version 2.1.1
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -113,7 +113,11 @@ static int rehash(Hash *pH, unsigned int new_size){ /* The inability to allocates space for a larger hash table is ** a performance hit but it is not a fatal error. So mark the - ** allocation as a benign. + ** allocation as a benign. Use sqlite3Malloc()/memset(0) instead of + ** sqlite3MallocZero() to make the allocation, as sqlite3MallocZero() + ** only zeroes the requested number of bytes whereas this module will + ** use the actual amount of space allocated for the hash table (which + ** may be larger than the requested amount). */ sqlite3BeginBenignMalloc(); new_ht = (struct _ht *)sqlite3Malloc( new_size*sizeof(struct _ht) ); |