D's New GC and Object Allocation Pools

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 26 02:01:12 PDT 2014


On 26 Oct 2014 08:05, "Mike via Digitalmars-d" <digitalmars-d at puremagic.com>
wrote:
>
> On Sunday, 26 October 2014 at 07:08:21 UTC, Mike wrote:
>
>> I tried this on my Linux desktop, and while everything compiled and
linked without errors, it resulted in a segmentation fault at runtime.  But
where I have failed, others may succeed.  I tested with LDC and GDC, but
not DMD.
>
>
> It does work, but for some reason if I replace the printf statement below
with D's writeln, I get a segmentation fault.  I don't know why.  Anywhere
here's a trivial example to illustrate the idea.
>

The std.stdio module has a shared static this which initialises the File
wrapper around C's stdin, stdout, and stderr.  I would first assume that it
segv's because the wrapper or internal pointer is null.

Iain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141026/d758708c/attachment.html>


More information about the Digitalmars-d mailing list