Lisp HUG Maillist Archive

array-total-size-limit, bug?

Hello,

Could you answer to the below question ? (posted on the mailing list on 19 March).

Best regards,

Francis

---

Hello,

It seems that the value of array-total-size-limit constant is actualy the value of ARRAY-DIMENSION-LIMIT (see below). If it's a bug, is there a patch for this? (want array-total-size-limit to really be 536870911).

Can someone tell me the value of ARRAY-TOTAL-SIZE-LIMIT for 64-bit LWw?

Thank you,

Francis

USER 48 > (let* ((dim0 500)
                 (dim1 (* 1000 1000))
                 (total-size (* dim0 dim1)))
            (format t "~& ~d ~d ~a" total-size array-total-size-limit (< total-size array-total-size-limit))
            (make-array (list dim0 dim1) :initial-element 0)
            (values))

 500000000 536870911 t
Error: Bad total size 500000000 for array, should be in the inclusive range 0 to 134216673.
  1 (abort) Return to level 0.
  2 Return to top loop level 0.

Type :b for backtrace, :c <option number> to proceed,  or :? for other options

USER 49 : 1 > ARRAY-DIMENSION-LIMIT
134216674


Re: array-total-size-limit, bug?


On Mar 21, 2008, at 11:40 AM, Francis Leboutte wrote:
> Hello,
>
> Could you answer to the below question ? (posted on the mailing list  
> on 19 March).
>
> Best regards,
>
> Francis
>
> ---
>
> Hello,
>
> It seems that the value of array-total-size-limit constant is  
> actualy the value of ARRAY-DIMENSION-LIMIT (see below). If it's a  
> bug, is there a patch for this? (want array-total-size-limit to  
> really be 536870911).

It is not uncommon for these two to be the same in lisp  
implementations - after all, in one dimensional arrays they are the  
same thing.


Raffael Cavallaro, Ph.D.
raffaelcavallaro@mac.com


Re: array-total-size-limit, bug?

You may be interrested in the answer I have received from LW:

You are correct, ARRAY-TOTAL-SIZE-LIMIT is set to the wrong value in LispWorks
5.0.  This will be fixed in LispWorks 5.1.

The correct value is 67108337 in 32-bit LispWorks.  However, the definition of
this constant is rather confusing, because it refers to the largest array of
any element type.  In the case of element-type T, you can actually make an
array with up to 134216673 elements in 32-bit LispWorks.

The maximum number of element in an array with element-type T in 64-bit
LispWorks is 536870910.

Francis


Le 25/03/2008 19:24, Raffael Cavallaro écrivait :


>On Mar 21, 2008, at 11:40 AM, Francis Leboutte wrote:
>>Hello,
>>
>>Could you answer to the below question ? (posted on the mailing list  
>>on 19 March).
>>
>>Best regards,
>>
>>Francis
>>
>>---
>>
>>Hello,
>>
>>It seems that the value of array-total-size-limit constant is  
>>actualy the value of ARRAY-DIMENSION-LIMIT (see below). If it's a  
>>bug, is there a patch for this? (want array-total-size-limit to  
>>really be 536870911).
>
>It is not uncommon for these two to be the same in lisp  
>implementations - after all, in one dimensional arrays they are the  
>same thing.
>
>
>Raffael Cavallaro, Ph.D.
>raffaelcavallaro@mac.com


Updated at: 2020-12-10 08:43 UTC