ALLOC(htab,sizeof(hTab));
- if (!(htab->table = GC_malloc((size +1)* sizeof(hashtItem *)))) {
+ if (!(htab->table = calloc((size +1), sizeof(hashtItem *)))) {
fprintf(stderr,"out of virtual memory %s %d\n",
__FILE__,(size +1)* sizeof(hashtItem *));
exit(1);
if (key > (*htab)->size ) {
int i;
- (*htab)->table = GC_realloc ((*htab)->table,
- (key*2 + 2)*sizeof(hashtItem *));
+ (*htab)->table = realloc ((*htab)->table,
+ (key*2 + 2)*sizeof(hashtItem *));
for ( i = (*htab)->size +1; i <= (key*2 + 1); i++ )
(*htab)->table[i] = NULL ;
(*htab)->size = key*2 + 1;
if (!(jc = p->table[i])) continue;
jn = jc->next;
while(jc){
- GC_free(jc);
+ free(jc);
if((jc=jn)) jn = jc->next;
}
p->table[i] = NULL ;
}
- GC_free(p->table);
+ free(p->table);
}
}