Make GlobalAlloc address alignment a bit more intuitive.
(more 6.7 changes)
- Declare GC_dump() in gc.h.
- Add --enable-large-config, which just defines the LARGE_CONFIG macro.
+ - Make GlobalAlloc address alignment a bit more intuitive. (Thanks to
+ Charles Mills.)
To do:
- REDIRECT_MALLOC and threads combination is getting closer, but currently
/* There are also unconfirmed rumors of other */
/* problems, so we dodge the issue. */
result = (ptr_t) GlobalAlloc(0, bytes + HBLKSIZE);
- result = (ptr_t)(((word)result + HBLKSIZE) & ~(HBLKSIZE-1));
+ result = (ptr_t)(((word)result + HBLKSIZE - 1) & ~(HBLKSIZE-1));
} else {
/* VirtualProtect only works on regions returned by a */
/* single VirtualAlloc call. Thus we allocate one */