[Issue 3463] Integrate Precise Heap Scanning Into the GC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 22 19:27:31 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3463



--- Comment #39 from Leandro Lucarella <llucax at gmail.com> 2010-07-22 19:27:29 PDT ---
(In reply to comment #38)
> If I'm understanding the patch right, I think I found a bug. At the end of
> reallocNoSync():
> 
> +            if (psize < size ||             // if new size is bigger
> +                psize > size * 2)           // or less than half
> +            {
> +                p2 = mallocNoSync(size, bits, bitMask);
> +
> +                psize -= bitMaskSize;
> +                size -= bitMaskSize;
> 
> 
> Shouldn't size and psize be updated before mallocNoSync() is called? Otherwise
> a block a word larger than needed would be allocated.

Same for the code inside version (SENTINEL).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list