www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Large statics

reply Cecil Ward <cecil cecilward.com> writes:
The docs say that there is a limit on the size of large statics 
of 16 MB. Is it desirable to remove this limit ? I realise that 
with new code there is the option to alloc the space instead 
where the static is uninitialised. There are other possibilities, 
such as an object filled with compile-time generated data maybe. 
The documentation also points out the crazy but understandable 
bloat on the exe size.

Is it possible to place a large object in BSS by using
   ubyte arr[ enormous ] = void;
Jun 25 2023
parent reply =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 6/25/23 13:41, Cecil Ward wrote:

 The docs say that there is a limit on the size of large statics
Customers (at least Weka) did request larger statics in the past. Since they use LDC, the limit was removed for LDC. I did not try it. :) Ali
Jun 25 2023
parent Cecil Ward <cecil cecilward.com> writes:
On Sunday, 25 June 2023 at 21:08:13 UTC, Ali Çehreli wrote:
 On 6/25/23 13:41, Cecil Ward wrote:

 The docs say that there is a limit on the size of large
statics Customers (at least Weka) did request larger statics in the past. Since they use LDC, the limit was removed for LDC. I did not try it. :) Ali
Ah, I did not know that, many thanks, I’m using LDC and GDC. A wishlist for the docs on the website would be to have them mention, and link to additional documentation regarding GDC and LDC, not just DMD. The docs should mainly be about the D language not solely about the DMD compiler.
Jun 25 2023