From: Bisht, P. <pra...@ya...> - 2011-02-04 18:09:44
|
Hello, has any one been successful in compiling and using Judy on 64-bit windows. First I think there is a bug in Judy.h - typedef unsigned long Word_t, * PWord_t; // expect 32-bit or 64-bit words. should have been #ifdef JU_WIN #ifdef JU_64BIT typedef uint64_t Word_t, * PWord_t; // expect 32-bit or 64-bit words. #else typedef uint32_t Word_t, * PWord_t; // expect 32-bit or 64-bit words. #endif #else // JU_WIN typedef unsigned long Word_t, * PWord_t; // expect 32-bit or 64-bit words. #endif Am I correct? Before making this change Judy1/LTaleGen.exe was failing in generating the tables and printing error ""BUG, in %sPopToWords, sizes not big enough for object\n". Now that I'm able to compile, it is crashing. my sample code is: void BuildJA () { Pvoid_t Parray = (Pvoid_t)NULL; // empty JudyL array Word_t lba, *Pvalue; // value for one index unsigned int i; for (i = 0; i < 1000; i++) { lba = i; // it crashes here for i = 1 JLI (Pvalue, Parray, lba); *Pvalue = 1; } } /* the main program */ int __cdecl main (int argc, char *argv[]) { BuildJA (); return (0); } crash happens at : static __inline int j__udySearchLeafW(Pjlw_t Pjlw, Word_t LeafPop1, Word_t Index) { SEARCHLEAFNATIVE(Word_t, Pjlw, LeafPop1, Index); } called from JudyLIns (). Am I doing something wrong here? Kindly note that on 32-bit windows I have done extensive testing several hours and several million entries without any problem. Thanks. |