Subversion Repositories HelenOS

Rev

Rev 3386 | Rev 4263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 59... Line 59...
59
    ASSERT(op && op->hash && op->compare);
59
    ASSERT(op && op->hash && op->compare);
60
    ASSERT(max_keys > 0);
60
    ASSERT(max_keys > 0);
61
   
61
   
62
    h->entry = (link_t *) malloc(m * sizeof(link_t), 0);
62
    h->entry = (link_t *) malloc(m * sizeof(link_t), 0);
63
    if (!h->entry) {
63
    if (!h->entry) {
64
        panic("cannot allocate memory for hash table\n");
64
        panic("Cannot allocate memory for hash table.");
65
    }
65
    }
66
    memsetb(h->entry, m * sizeof(link_t), 0);
66
    memsetb(h->entry, m * sizeof(link_t), 0);
67
   
67
   
68
    for (i = 0; i < m; i++)
68
    for (i = 0; i < m; i++)
69
        list_initialize(&h->entry[i]);
69
        list_initialize(&h->entry[i]);