From: Dirk Herrmann <dirk@sallust.ida.ing.tu-bs.de>
Cc: guile-user@gnu.org, Marius Vollmer <mvo@zagadka.ping.de>,
Erik Swahn <erik.swahn@neurologic.se>
Subject: Re: Fix limitations on vector length
Date: Tue, 25 Jun 2002 21:50:56 +0200 (CEST) [thread overview]
Message-ID: <Pine.GSO.4.05.10206252128130.1211-100000@sallust.ida.ing.tu-bs.de> (raw)
In-Reply-To: <200206251332.PAA12602@faun.nada.kth.se>
On Tue, 25 Jun 2002, Roland Orre wrote:
> Some of our code using multidimensional arrays behaved buggy and that
> showed to be caused by the limitations of vector lengths to 24 bits,
> we need at least a few bits more at the moment.
>
> Problems:
> 1) the allocation of the array did not cause an error message.
> 2) we need an urgent simple fix for utilizing big arrays.
>
> What we inted to do is to change the SCM_LENGTH macro and the
> memory allocation for vectors and arrays so when the length
> need more than 24 bits the length is stored in the beginning
> of the array memory, that is we add an offset of four to the
> base pointer.
>
> Any comments?
First a note: Since you still use the SCM_LENGTH macro, you are probably
using guile 1.4. This macro has been deprecated in 1.6 and replaced by a
bunch of macros like SCM_VECTOR_LENGTH and so on. It could be worth
changing to the upcoming 1.6 from CVS since modifications to guile's built
in types are supposed to be less painfull. I don't know about arrays, but
at least for vectors you get an error message if you try to allocate too
large a vector in 1.6.
Second, a suggestion: The following solution might(!) cause less
problems:
* if you need more than 24 bits, allocate the vector object as a double
cell, set the 24 'standard' length bits to 0xFFFFFF, and store the real
length in the remaining two words of the double cell.
* make sure, you also update the garbage collector code for vectors.
Then, you don't have to do any trickery with the base pointer, only with
the length information. I don't know about the array stuff, though...
Best regards
Dirk Herrmann
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2002-06-25 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-25 13:32 Fix limitations on vector length Roland Orre
2002-06-25 19:50 ` Dirk Herrmann [this message]
2002-10-04 18:24 ` Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.05.10206252128130.1211-100000@sallust.ida.ing.tu-bs.de \
--to=dirk@sallust.ida.ing.tu-bs.de \
--cc=erik.swahn@neurologic.se \
--cc=guile-user@gnu.org \
--cc=mvo@zagadka.ping.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).