ref: 45c11c944bd4d757603f2dad3ea739410db7261a
parent: 731e41cdb62f35d7a8fdb28a31ce707440aa8520
author: JeffBezanson <[email protected]>
date: Sat Apr 10 00:25:59 EDT 2010
porting over some small LLT fixes
--- a/llt/dtypes.h
+++ b/llt/dtypes.h
@@ -74,7 +74,7 @@
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
--- a/llt/htable.inc
+++ b/llt/htable.inc
@@ -50,11 +50,11 @@
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 @@
} \
} \
if (ol != &h->_space[0]) \
- free(ol); \
+ LLT_FREE(ol); \
\
sz = hash_size(h); \
maxprobe = max_probe(sz); \