Doesn’t chaining_hashmap_type imply a hash table that uses linked lists to manage collisions? This means that the initial array is at whatever size the hashmap decides and each array element contains the head of the linked list that stores actual elements. Thus for 2^28 entries are likely to have lots of linked list elements allocated for them, much greater than 4 bytes per element.