On 1/24/18 4:48 PM, Nordlöw wrote:
Why is the memory overhead for a class instance as high as 3 words (24
bytes on 64-bit systems? I find that annoyingly much for my knowledge
database application. I'm aware of extern(C++), having one word
overhead, but such extern(C++)-classes cannot use all of D; I get
compilation errors such as
node.d(99,25): Error: Internal Compiler Error: type `inout(Edge)[]` can
not be mapped to C++
Should be 2 words, the monitor and the typeinfo pointer. What is the 3rd
one?
On 64-bit macos:
class C
{
}
void main()
{
import std.stdio;
writeln(typeid(C).initializer.length); // 16
}
-Steve