On Wed, 10 May 2006, Linus Torvalds wrote:Yep. No. The initial allocation assumes a perfectly even distribution of entries in which case the entry array would be all populated. When there are repeated bytes then consecutive blocks will have the same hash, and in that case keeping only the first one is useful. Which means that the entry pointer won't get to the end of the allocated space for all entries and I naively assumed that using realloc would only mark the allocated memory as smaller than it originally was without actually copying any of the remaining data, which is what happened in most cases but evidently not always. But if the buffer moves the hash array containing _pointers_ to hash entries gets totally screwed. Yeah... I might just do a separate allocation for hash entries as well. Or maybe even drop the hash chaining altogether (now that the code does backward matching that might be worth the code simplification). Nicolas - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Re: Slow DOWN, please!!! |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Greg KH | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Josip Rodin | bnx2_poll panicking kernel |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
