Thread overview |
---|
December 03, 2009 out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
I was trying out composite oriented programming, meaning moving class functionality into templates which you then mixin. First part mixined just fine, second also ok, third . . - Error : Out of memory (2GB VM) Even with an empty template :( |
December 03, 2009 Re: out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Removing a struct definition from the second mixin seems to fix the problem. Is this a (known) bug? The struct was only used within that template. public struct S { enum LOCAL { ONE, TWO }; LOCAL local; bool b = false; StructOut s; ENUM_OUT eo; } |
December 03, 2009 Re: out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Saaa:
> Is this a (known) bug?
It's generally better if you show a tiny compilable example that has the problem.
Bye,
bearophile
|
December 03, 2009 Re: out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile |
bearophile wrote:
> Saaa:
>> Is this a (known) bug?
>
> It's generally better if you show a tiny compilable example that has the problem.
>
> Bye,
> bearophile
I'm trying :)
I just hoped somebody would recognize it from my babbling
|
December 03, 2009 Re: out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Tomorrow I'll continue my quest for the mall piece of code which will choke the compiler. |
December 04, 2009 Re: out of memory error with template mixins | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Can't recreate the error in a small test project (5 modules). I think the problem lies somewhere in between cyclic module imports, mixin struct definitions and maybe the actual size of the class(1k) and its complexity of interfaces(8). One more thing: The out of memory is before it can tell there is an variable missing, although the error is also there when the variable is not missing. |
Copyright © 1999-2021 by the D Language Foundation