From 45c11c944bd4d757603f2dad3ea739410db7261a Mon Sep 17 00:00:00 2001 From: JeffBezanson Date: Sat, 10 Apr 2010 04:25:59 +0000 Subject: [PATCH] porting over some small LLT fixes --- llt/dtypes.h | 2 +- llt/htable.inc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llt/dtypes.h b/llt/dtypes.h index 04d46dd..fbb1bc4 100644 --- a/llt/dtypes.h +++ b/llt/dtypes.h @@ -74,7 +74,7 @@ typedef long int_t; typedef int64_t offset_t; typedef u_int64_t index_t; typedef int64_t ptrint_t; // pointer-size int -typedef u_int64_t u_ptrint_t +typedef u_int64_t u_ptrint_t; #else #define TOP_BIT 0x80000000 #define NBITS 32 diff --git a/llt/htable.inc b/llt/htable.inc index f7d2046..97b3ca2 100644 --- a/llt/htable.inc +++ b/llt/htable.inc @@ -50,11 +50,11 @@ static void **HTNAME##_lookup_bp(htable_t *h, void *key) \ if (sz >= (1<<19) || (sz <= (1<<8))) \ newsz = sz<<1; \ else if (sz <= HT_N_INLINE) \ - newsz = 32; \ + newsz = HT_N_INLINE; \ else \ newsz = sz<<2; \ /*printf("trying to allocate %d words.\n", newsz); fflush(stdout);*/ \ - tab = (void**)malloc(newsz*sizeof(void*)); \ + tab = (void**)LLT_ALLOC(newsz*sizeof(void*)); \ if (tab == NULL) \ return NULL; \ for(i=0; i < newsz; i++) \ @@ -67,7 +67,7 @@ static void **HTNAME##_lookup_bp(htable_t *h, void *key) \ } \ } \ if (ol != &h->_space[0]) \ - free(ol); \ + LLT_FREE(ol); \ \ sz = hash_size(h); \ maxprobe = max_probe(sz); \