Re: Class instance memory overhead lower than 3 words?

2018-01-26 Thread Steven Schveighoffer via Digitalmars-d-learn
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

Re: Class instance memory overhead lower than 3 words?

2018-01-25 Thread kinke via Digitalmars-d-learn
On Wednesday, 24 January 2018 at 21:48:21 UTC, 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

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, January 24, 2018 17:50:35 Ali Çehreli via Digitalmars-d-learn wrote: > On 01/24/2018 05:43 PM, Jonathan M Davis wrote: > > On Thursday, January 25, 2018 00:10:32 Nicholas Wilson via > > Digitalmars-d- > > > > learn wrote: > >> One pointer for the vtbl, one for the monitor, not sure

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Ali Çehreli via Digitalmars-d-learn
On 01/24/2018 05:43 PM, Jonathan M Davis wrote: On Thursday, January 25, 2018 00:10:32 Nicholas Wilson via Digitalmars-d- learn wrote: One pointer for the vtbl, one for the monitor, not sure what the other one is. The TypeInfo maybe? I'm not sure where that lives. - Jonathan M Davis

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, January 25, 2018 00:10:32 Nicholas Wilson via Digitalmars-d- learn wrote: > One pointer for the vtbl, one for the monitor, not sure what the > other one is. The TypeInfo maybe? I'm not sure where that lives. - Jonathan M Davis

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 24 January 2018 at 22:27:40 UTC, Nordlöw wrote: On Wednesday, 24 January 2018 at 21:47:26 UTC, H. S. Teoh wrote: On Wed, Jan 24, 2018 at 09:48:21PM +, Nordlöw via Digitalmars-d-learn wrote: Why is the memory overhead for a class instance as high as 3 words (24 bytes on 64-bit

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 24 January 2018 at 21:48:21 UTC, 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

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 24 January 2018 at 21:47:26 UTC, H. S. Teoh wrote: On Wed, Jan 24, 2018 at 09:48:21PM +, Nordlöw via Digitalmars-d-learn 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

Re: Class instance memory overhead lower than 3 words?

2018-01-24 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 24, 2018 at 09:48:21PM +, Nordlöw via Digitalmars-d-learn 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. [...] There's been an attempt to get rid of the