summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a885aa)
raw | patch | inline | side by side (parent: 2a885aa)
author | sgimenez <sgimenez@users.sourceforge.net> | |
Tue, 21 Nov 2006 20:21:27 +0000 (20:21 +0000) | ||
committer | sgimenez <sgimenez@users.sourceforge.net> | |
Tue, 21 Nov 2006 20:21:27 +0000 (20:21 +0000) |
src/trace/pool.h | patch | blob | history |
diff --git a/src/trace/pool.h b/src/trace/pool.h
index 3f722f5385b8dab6941092037663afb5dcb58fa7..d072a460b31d6d71d997a0c41757e1d7fe349e33 100644 (file)
--- a/src/trace/pool.h
+++ b/src/trace/pool.h
//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];