<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Am 04.09.2011 06:48, schrieb Walter Bright:
    <blockquote cite="mid:4E630339.1060606@digitalmars.com" type="cite"><a class="moz-txt-link-freetext" href="http://ftp.digitalmars.com/dmd1beta.zip">http://ftp.digitalmars.com/dmd1beta.zip</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://ftp.digitalmars.com/dmd2beta.zip">http://ftp.digitalmars.com/dmd2beta.zip</a>
      <br>
      _______________________________________________
      <br>
      dmd-beta mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:dmd-beta@puremagic.com">dmd-beta@puremagic.com</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.puremagic.com/mailman/listinfo/dmd-beta">http://lists.puremagic.com/mailman/listinfo/dmd-beta</a>
      <br>
    </blockquote>
    Has anything changed with regard to TLS?<br>
    <br>
    I'm getting OutOfMemoryErrors when accessing TLS arrays from within
    a DLL. Maybe the dll_fixTLS function in core.sys.windows.dll needs
    to be adjusted?<br>
    <br>
    ---<br>
    <title>Snippet</title>
    <span style="color:blue;">import</span> std.c.windows.windows;<br>
    <span style="color:blue;">import</span> core.sys.windows.dll;<br>
    <br>
    <span style="color:blue;">int</span>[] s_arr;<br>
    <br>
    <span style="color:blue;">extern</span> (Windows)
BOOL DllMain(HINSTANCE hInstance, ULONG ulReason, LPVOID pvReserved) 
    {<br>
        <span style="color:blue;">switch</span> (ulReason) {<br>
            <span style="color:blue;">default</span>: <span
      style="color:blue;">return</span> <span style="color:blue;">false</span>;<br>
            <span style="color:blue;">case</span> DLL_PROCESS_ATTACH:<span
      style="color:blue;"><br>
                  if</span>( !dll_process_attach( hInstance, <span
      style="color:blue;">true</span> ) ) <span style="color:blue;">return</span> <span
      style="color:blue;">false</span>;<br>
                s_arr ~= 0; // -> OutOfMemoryError<br>
                <span style="color:blue;">break</span>;<br>
        }<br>
        <span style="color:blue;">return</span> <span
      style="color:blue;">true</span>;<br>
    }<br>
    ---<br>
  </body>
</html>