[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug involving VECTOR-PUSH-EXTEND
>Beg to differ (though only a little). Apparently, KCL uses the
>current size of the vector as the default extension (must be in the
>report some place). Of course, extending a vector of size zero by
>zero elements still causes trouble. CLtL only says that, in the
>absence of a third argument "it defaults to a ``reasonable''
>implementation-dependent value". Whether using the current size is
>``reasonable'' can be left to discussion. See:
I've seen the same bug in other implementations. To me, doubling the
size of the array is not "reasonable". Besides the trouble with a zero
sized array, you probably don't want a very, very BIG array, that happend
to be just one element too short, suddenly eat all that was left of your
address space...
A "reasonable" default extension should be something "harmless", perhaps
X elements, where X is greater than zero but never more than 10% of the
current size, or something like that.
~martin
((Per-Erik Martin, Computing Science Dept., Uppsala University, )
(Box 520, S-751 20 Uppsala, Sweden )
(UUCP: martin@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!martin)))