Class instance memory overhead lower than 3 words?

Nordlöw per.nordlow at gmail.com
Wed Jan 24 21:48:21 UTC 2018


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++


More information about the Digitalmars-d-learn mailing list