Rev 814 | Rev 902 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 814 | Rev 822 | ||
|---|---|---|---|
| Line 49... | Line 49... | ||
| 49 | { |
49 | { |
| 50 | ASSERT(h); |
50 | ASSERT(h); |
| 51 | ASSERT(op && op->hash && op->compare); |
51 | ASSERT(op && op->hash && op->compare); |
| 52 | ASSERT(max_keys > 0); |
52 | ASSERT(max_keys > 0); |
| 53 | 53 | ||
| 54 | h->entry = malloc(m * sizeof(link_t *)); |
54 | h->entry = malloc(m * sizeof(link_t *), 0); |
| 55 | if (!h->entry) { |
55 | if (!h->entry) { |
| 56 | panic("cannot allocate memory for hash table\n"); |
56 | panic("cannot allocate memory for hash table\n"); |
| 57 | } |
57 | } |
| 58 | memsetb((__address) h->entry, m * sizeof(link_t *), 0); |
58 | memsetb((__address) h->entry, m * sizeof(link_t *), 0); |
| 59 | 59 | ||