#include <assert.h>
#include "SDCCglobl.h"
#include "SDCChasht.h"
+#include "newalloc.h"
#define DEFAULT_HTAB_SIZE 128
{
hashtItem *htip;
- ALLOC(htip,sizeof(hashtItem));
+ htip = Safe_calloc(sizeof(hashtItem));
htip->key = key ;
htip->pkey = pkey;
{
hTab *htab;
- ALLOC(htab,sizeof(hTab));
+ htab = Safe_calloc(sizeof(hTab));
if (!(htab->table = calloc((size +1), sizeof(hashtItem *)))) {
fprintf(stderr,"out of virtual memory %s %d\n",
if (key > (*htab)->size ) {
int i;
- (*htab)->table = realloc ((*htab)->table,
+ (*htab)->table = Safe_realloc ((*htab)->table,
(key*2 + 2)*sizeof(hashtItem *));
for ( i = (*htab)->size +1; i <= (key*2 + 1); i++ )
(*htab)->table[i] = NULL ;