chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #794: on 32bit systems srfi-4 make- procedures fa


From: Chicken Trac
Subject: Re: [Chicken-janitors] #794: on 32bit systems srfi-4 make- procedures fail where make-vector succeeds
Date: Fri, 02 Mar 2012 22:43:12 -0000

#794: on 32bit systems srfi-4 make- procedures fail where make-vector succeeds
-----------------------------+----------------------------------------------
  Reporter:  ckeen           |       Owner:  ckeen                   
      Type:  defect          |      Status:  assigned                
  Priority:  major           |   Milestone:  4.8.0                   
 Component:  core libraries  |     Version:  4.7.x                   
Resolution:                  |    Keywords:  srfi-4 make-vector 32bit
-----------------------------+----------------------------------------------
Changes (by zbigniew):

  * status:  new => assigned


Comment:

 Byte vector objects (strings, blobs) are limited to 24-bit length (0 -
 16777215 bytes).

 srfi-4 vectors are implemented with a srfi-4 header on top of a blob.
 Therefore u32 vectors are limited to 4,194,303 entries (since 4194303
 words * 4 bytes/word = 16777212 bytes), in other words a 22-bit length.

 So this can be chalked up to a confusing error message and a lack of
 documentation on the limits on srfi-4 vector length.

 Naturally this occurs on 64-bit platforms as well, but the length is 54
 bits instead of 56 bits, so you are unlikely to hit either limit; nor
 would I advise you to try.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/794#comment:3>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]