Analysis of D GC

via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 20 07:16:40 PDT 2017


On Tuesday, 20 June 2017 at 11:44:41 UTC, rikki cattermole wrote:
> On 20/06/2017 12:41 PM, Jacob Carlborg wrote:
>> On 2017-06-20 06:37, ketmar wrote:
>> 
>>> it is higly depends of undocumented windows internals, and 
>>> not portable between windows versions. more-or-less working 
>>> implementations of `fork()` were existed at least since NT3 
>>> era, but nobody considered 'em as more than a PoC, and even 
>>> next service pack can break everything.
>> 
>> I'm wondering what Windows 10 is using to implement "fork" for 
>> Windows Subsystem for Linux. If it's using these internal 
>> functions or something else.
>
> It wouldn't surprise me to learn that it was a posix layer 
> specific syscall, meaning we can't from a native Windows 
> process.

The Windows Subsystem for Linux is build on a new form processes 
called
picoprocesses. There's a whole API build specifically to service 
WSL,
that's not otherwise available (AFAIR) for security reasons to 
normal processes.

I highly recommend watching this talk: 
https://www.youtube.com/watch?v=36Ykla27FIo and browsing through 
this repo: https://github.com/ionescu007/lxss which reveals many 
interesting details about that part of Windows.

I have watched that talk a while ago and maybe I have 
misremembered something, but my understanding is that using the 
WSL infrastructure is off limits for normal Win32 processes and 
as such is not suitable for implementation of CoW pages for D's 
GC.
(I watched that talk specifically because I was interested if 
some of that could be used in druntime.)


More information about the Digitalmars-d mailing list