Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 24, 2007 DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
New pointer-aware GC. Should run significantly faster for some programs. http://www.digitalmars.com/d/changelog.html http://ftp.digitalmars.com/dmd.1.001.zip |
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> New pointer-aware GC. Should run significantly faster for some programs.
>
> http://www.digitalmars.com/d/changelog.html
>
> http://ftp.digitalmars.com/dmd.1.001.zip
Yay!!
Thanks Walter.
Are both features active when compiling with -v1?
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Julio César Carrascal Urquijo | Julio César Carrascal Urquijo wrote:
> Walter Bright wrote:
>> New pointer-aware GC. Should run significantly faster for some programs.
>>
>> http://www.digitalmars.com/d/changelog.html
>>
>> http://ftp.digitalmars.com/dmd.1.001.zip
>
> Yay!!
>
> Thanks Walter.
>
> Are both features active when compiling with -v1?
Yes, because it's a runtime issue. You can revert to the old behavior by calling std.gc.setV1_0(), which is handy for making timing comparisons.
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> New pointer-aware GC. Should run significantly faster for some programs.
>
> http://www.digitalmars.com/d/changelog.html
>
> http://ftp.digitalmars.com/dmd.1.001.zip
Nice to see a new release. Was getting used to weekly updates ;)
About the GC updates. I think it would be nice with some more
documentation on how it works now.
Your post about "Transitioning to a type aware Garbage Collector" has
some information that is critical to using it efficiently.
Until now I have been using some void[]'s for pixel data. As I understand it I should change these to ubyte[] now to avoid the old gc's conservative behaviour. (I realise I should probably have used malloc or something before).
I see a few problems here, though I might be wrong. (not related to
pixels...)
Fx: If I used std.file.read to read a file I get a GC allocated void[]. It's not _that_ unlikely that some of the data could look like a pointer. But the GC will handle the block as if it could all be pointers as it is void[]. Is this correct?
In that case I would say these cases should be changed to ubyte[] as the contents of a file does not hold any valid pointers.
I'm sure this applies to other areas of Phobos.
Hope I'm not talking completely out of my arse here! GC's is not really something I know a whole lot about...
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > Julio César Carrascal Urquijo wrote: > > Walter Bright wrote: > > > New pointer-aware GC. Should run significantly faster for some programs. > > > > > > http://www.digitalmars.com/d/changelog.html > > > > > > http://ftp.digitalmars.com/dmd.1.001.zip > > > > Yay!! > > > > Thanks Walter. > > > > Are both features active when compiling with -v1? > > Yes, because it's a runtime issue. You can revert to the old behavior by calling std.gc.setV1_0(), which is handy for making timing comparisons. Yet it also means that code working in 1.0 might be horribly broken in 1.001... -- |
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright Wrote:
> New pointer-aware GC. Should run significantly faster for some programs.
>
> http://www.digitalmars.com/d/changelog.html
>
> http://ftp.digitalmars.com/dmd.1.001.zip
Very nice. Thanks Walter.
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomas Lindquist Olsen | Tomas Lindquist Olsen wrote:
> Fx: If I used std.file.read to read a file I get a GC allocated void[].
> It's not _that_ unlikely that some of the data could look like a
> pointer. But the GC will handle the block as if it could all be
> pointers as it is void[]. Is this correct?
Take a look at the source to std.file.read() <g>.
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound@digitalmars.com> wrote in message news:ep6asn$aer$1@digitaldaemon.com... > New pointer-aware GC. Should run significantly faster for some programs. > > http://www.digitalmars.com/d/changelog.html > > http://ftp.digitalmars.com/dmd.1.001.zip Yay, update time! I've missed these. |
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Tomas Lindquist Olsen wrote:
> > Fx: If I used std.file.read to read a file I get a GC allocated void[]. It's not that unlikely that some of the data could look like a pointer. But the GC will handle the block as if it could all be pointers as it is void[]. Is this correct?
>
> Take a look at the source to std.file.read() <g>.
LOL
*hides in shame*
|
January 24, 2007 Re: DMD 1.001 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tomas Lindquist Olsen | Tomas Lindquist Olsen wrote:
> Walter Bright wrote:
>
> > Tomas Lindquist Olsen wrote:
> > > Fx: If I used std.file.read to read a file I get a GC allocated void[]. It's not that unlikely that some of the data could look like a pointer. But the GC will handle the block as if it could all be pointers as it is void[]. Is this correct?
> >
> > Take a look at the source to std.file.read() <g>.
>
> LOL
>
> *hides in shame*
buuuuuut ;)
std.zlib is not doing this correctly.
which also makes me think about how to handle this case properly:
void[] dst = new void[1024];
dst.length = dst.length + 1024;
dst.length = dst.length + 1024;
dst.length = dst.length + 1024;
dst.length = dst.length + 1024;
dst.length = dst.length + 1024;
assuming one of these calls have to relocate how would I be sure that I
inform the GC properly?
A call to the GC in the end would obviously do, but what if you want to
make sure the GC doesn't scan the array while it's still being resized?
While I'm at it I have been wondering why we can't have:
void[1024] sa;
when
void[] da = new void[1024];
is perfectly fine.
|
Copyright © 1999-2021 by the D Language Foundation