From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Uniform vector lengths -- how long? Date: Sun, 20 Jun 2004 16:00:18 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <878yeieyhp.fsf@trouble.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1087765274 1474 80.91.224.253 (20 Jun 2004 21:01:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Jun 2004 21:01:14 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jun 20 23:01:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bc9R3-00023y-00 for ; Sun, 20 Jun 2004 23:01:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bc9SH-0005uW-3t for guile-devel@m.gmane.org; Sun, 20 Jun 2004 17:02:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bc9SB-0005uQ-OF for guile-devel@gnu.org; Sun, 20 Jun 2004 17:02:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bc9SA-0005uE-0Y for guile-devel@gnu.org; Sun, 20 Jun 2004 17:02:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bc9S9-0005uB-SD for guile-devel@gnu.org; Sun, 20 Jun 2004 17:02:13 -0400 Original-Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bc9Qo-00068w-OP for guile-devel@gnu.org; Sun, 20 Jun 2004 17:00:51 -0400 Original-Received: from trouble.defaultvalue.org (omen.defaultvalue.org [192.168.1.1]) by defaultvalue.org (Postfix) with ESMTP id EB58F40F4 for ; Sun, 20 Jun 2004 16:00:49 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id C9B79410B8; Sun, 20 Jun 2004 16:00:18 -0500 (CDT) Original-To: guile-devel@gnu.org User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3810 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3810 Right now the srfi-4 code stores the length of uniform vectors in SCM_CELL_WORD_2, and sometimes retrieves these lengths directly into an int: #define SCM_UVEC_LENGTH(u) (SCM_CELL_WORD_2(u)) ... int i = SCM_UVEC_LENGTH (uvec); which is probably wrong for architectures where sizeof(int) < sizeof(long), and in all cases, limits array sizes to 2GB. Other code uses SCM_VALIDATE_INUM to check the lengths given to "make-FOOvector", which limits the maximum array size even further. So the thing I'm wondering about is how do we want our uniform vectors to behave? Is it OK for their lengths to be limited to a fixnum? What if someone wants to allocate a multi-GB s8 array on a 64-bit machine, or a much smaller, but still larger than fixnum array on a 32-bit machine? -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel