Author: Stan Eisenstat
Subject: Re: Question on cs323 LZW pset
Date: Sunday, 25 Oct 2020, 07:31:58
> I had a question for the hash table on the lzw pset. In terms of the memory > constraint, each time we need to resize the hash table, can we initialize a > larger hash table, copy all items from the old to new hash table, and then > free the old hash table? The reason I ask is because although this is > simpler, a lot of additional memory is allocated during the programs > overall run, although the memory at any given point would be the same - so > will the algorithm that checks 9*SIZE check for total memory allocated in > the program or just at some specific point or some other mechanism (as this > would affect my implementation of resizing the table)? The limit is on the total amount of storage in the data (= globals and static locals), heap (= malloc()-ed), and stack (= arguments and automatic locals) segments and applies at ALL times. --Stan-PREV INDEX NEXT