Is it?



From: Bisht, Pradeep <pradeep_bisht@yahoo.com>
To: judy-devel@lists.sourceforge.net <judy-devel@lists.sourceforge.net>
Sent: Fri Feb 04 17:01:53 2011
Subject: Re: Judy on 64-bit windows;

I just noticed that Judy sourforge page says "operating systems: All 32-bit MS Windows (95/98/NT/2000/XP),". Looks like 64-bit is not supported. Is it correct? Thanks.


From: "Bisht, Pradeep" <pradeep_bisht@yahoo.com>
To: judy-devel@lists.sourceforge.net
Sent: Fri, February 4, 2011 10:09:37 AM
Subject: Judy on 64-bit windows;

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.