hash and heap