Code

should fix compilation issues on 64bit arches
authorsgimenez <sgimenez@users.sourceforge.net>
Tue, 21 Nov 2006 20:21:27 +0000 (20:21 +0000)
committersgimenez <sgimenez@users.sourceforge.net>
Tue, 21 Nov 2006 20:21:27 +0000 (20:21 +0000)
src/trace/pool.h

index 3f722f5385b8dab6941092037663afb5dcb58fa7..d072a460b31d6d71d997a0c41757e1d7fe349e33 100644 (file)
@@ -99,11 +99,11 @@ class pool {
       //printf("pool allocating block: %d (size:%d)...", i, blocksize);//debug
       block[i] = (void *)malloc(blocksize * size);
       if (!block[i]) throw std::bad_alloc();
-      void *p = block[i];
+      char *p = (char *)block[i];
       for (int k = 0; k < blocksize - 1; k++)
        {
-         *(void**)p = (void *)((int)p + size);
-         p = (void *)((int)p + size);
+         *(void**)p = (void *)(p + size);
+         p += size;
        }
       *(void **)p = next;
       next = block[i];