Single call API for the heap
Single call API for the heap
Posted Oct 31, 2024 15:56 UTC (Thu) by anton (subscriber, #25547)In reply to: Single call API for the heap by NYKevin
Parent article: realloc() and the oversize importance of zero-size objects
I have never read anything about "good hash inputs". Normally the idea is that a good hash function distributes the inputs into the buckets like a random choice of buckets or better (perfect hashing), for inputs of any characteristics (of course each hash function has input sets that produce worst-case behaviour, but for good hash functions trivial patterns do not form such sets).
I expect that you mean that "good hash inputs" do ok even for bad hash functions. The solution to this problem is to use good hash functions, not to produce "good hash inputs" from realloc(...,0). There is no guarantee of "good hash inputs" for any other stuff that you might throw at the hash function, including other uses of realloc().
Posted Oct 31, 2024 17:56 UTC (Thu)
by NYKevin (subscriber, #129325)
[Link] (1 responses)
Posted Nov 1, 2024 12:04 UTC (Fri)
by paulj (subscriber, #341)
[Link]
Single call API for the heap
Single call API for the heap