Problems with GC, trees and array concatenation
David B. Held
dheld at codelogicconsulting.com
Mon Jun 4 08:57:33 PDT 2007
Oskar Linde wrote:
> [...]
> The code is actually commented out on DMD:
> //foreach(inout byte b; cast(byte[])(p + size)[0..binsize[bin] - size])
> { b = 0; }
>
> A patch that reverses that comment:
>
> --- gcx.d 2007-06-04 16:47:02.354590379 +0200
> +++ gcx.d.new 2007-06-04 16:46:53.331933006 +0200
> @@ -297,7 +297,7 @@
> gcx.bucket[bin] = (cast(List *)p).next;
> //memset(p + size, 0, binsize[bin] - size);
> // 'inline' memset - Dave Fladebo.
> - //foreach(inout byte b; cast(byte[])(p +
> size)[0..binsize[bin] - size]) { b = 0; }
> + foreach(inout byte b; cast(byte[])(p +
> size)[0..binsize[bin] - size]) { b = 0; }
> //debug(PRINTF) printf("\tmalloc => %x\n", p);
> debug (MEMSTOMP) memset(p, 0xF0, size);
> }
> [...]
Could one of you guys file a bug report for this? Looks pretty important.
Dave
More information about the Digitalmars-d
mailing list