How are 2D static arrays allocated?
    Steven Schveighoffer 
    schveiguy at yahoo.com
       
    Tue Nov  4 05:53:52 PST 2008
    
    
  
"Robert Fraser" wrote
> Jesse Phillips wrote:
>> In C allocating a static 2D array gives a continues chunk of memory. Java 
>> creates an array that points to more arrays. Just wondering how D handles 
>> this.
>
> The only reason static arrays seem to exist at all (as well as good 
> explanation for their incongruity with other types) is C compatibility.
They are also good for allocating buffer space on the stack.
But I agree that their incongruity with other types sucks.
-Steve 
    
    
More information about the Digitalmars-d-learn
mailing list