-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed LinearProbingHashTable allocation issue.
Now the table stores objects of key-value pairs, not pointers to them. The class is still heavy, in the sense that it uses a lot of inline functions to hide actual storage policy (pointers/objects). An efficient implementation (or future rewrite) can replace these inline functions with code to directly access/change table elements. Important: Now we use malloc/free to allocate/deallocate table memory. This is because we cannot use memset() to zero-initialize the memory allocated by new, because then delete[] fails. (It destroys internal pointers at the begniing of each allocated object.) Signed-off-by: saad0105050 <saad0105050@gmail.com>
- Loading branch information
saad0105050
committed
Sep 16, 2014
1 parent
a490f54
commit 5a4c945
Showing
3 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters