The amount of memory allocated for an array can
be up to a factor of 2 larger than the minimum.
The upside is that your faithful implementer
would have room to achieve his nefarious ends
(such as append-in-place), and also that the memory
management for small blocks would be simplified.
The downside is that the address space is used up
faster than it would be otherwise.



----- Original Message -----
From: Michael Berry <[EMAIL PROTECTED]>
Date: Friday, January 5, 2007 9:25 am
Subject: [Jprogramming] How to interpret the space used by an array     
according to 7!:5

> The quick and helpful answers I get from this list encourage me to 
> ask more
> questions. I hope that is OK.
> 
> In my mental model of how things work, I imagine a J array to be 
> stored as a
> fixed size header (or a header of size that is a function of the 
> array rank)
> followed by the array contents. According to 7!:5, my floating 
> point array
> seems to take up more space that that. This in on 32-bit Windows.
> 
> 
>   $rater_sig02
> 480189 19
>   8**/$rater_sig02
> 72988728
>   7!:5 <'rater_sig02'
> 134217728
>   (7!:5 <'rater_sig02')%*/$rater_sig02
> 14.7111
> 
> 
> In addition to just intellectual curiosity, my practical question 
> is whether
> I need to think about anything beyond the number of elements and 
> the type of
> my array when creating a mapped file to contain it.


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to