digitalmars.D.learn - Where is a variable declared in a module allocated?
- MachineCode (5/5) Oct 25 2014 Where is a variable declared in a module allocated? is it same as
- John Colvin (5/10) Oct 25 2014 that is in thread local storage.
- MachineCode (2/14) Oct 26 2014 Thank you guy. :) I need to learn to use that forum search.
- John Colvin (2/14) Oct 27 2014 woops, sorry, that should be __gshared
Where is a variable declared in a module allocated? is it same as a C's global? for example: module foo; int myvar;
Oct 25 2014
On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:Where is a variable declared in a module allocated? is it same as a C's global? for example: module foo; int myvar;that is in thread local storage. __shared, shared or immutable cause the variable to be in classic global storage like in C. See: http://dlang.org/migrate-to-shared.html
Oct 25 2014
On Saturday, 25 October 2014 at 22:16:12 UTC, John Colvin wrote:On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:Thank you guy. :) I need to learn to use that forum search.Where is a variable declared in a module allocated? is it same as a C's global? for example: module foo; int myvar;that is in thread local storage. __shared, shared or immutable cause the variable to be in classic global storage like in C. See: http://dlang.org/migrate-to-shared.html
Oct 26 2014
On Saturday, 25 October 2014 at 22:16:12 UTC, John Colvin wrote:On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:woops, sorry, that should be __gsharedWhere is a variable declared in a module allocated? is it same as a C's global? for example: module foo; int myvar;that is in thread local storage. __shared, shared or immutable cause the variable to be in classic global storage like in C. See: http://dlang.org/migrate-to-shared.html
Oct 27 2014