http://d.puremagic.com/issues/show_bug.cgi?id=10323

           Summary: getAMDcacheinfo needlessly allocates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: druntime
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Adam D. Ruppe <[email protected]> 2013-06-10 
11:55:55 PDT ---
src/druntime/src/core/cpuid.d line 544:

        immutable ubyte [] assocmap = [ 0, 1, 2, 0, 4, 0, 8, 0, 16, 0, 32, 48,
64, 96, 128, 0xFF ];


The real problem here is that a array initializer allocates, even if all the
data is static, and the compiler should probably be fixed, but in the mean time
I think we should go ahead and kill as many allocations as possible from
druntime, and this is one of them.

In my experimentation, I found just sticking "static" in front of this line
solved the immediate problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to