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

Namestring&pathstring returning shared structure

It seems to me that the user needs some way to know whether a string is
being shared or not, so he/she can copy it before modifying it if it is
being shared and avoid the extra copy if it has already been copied.
Alternately the CL system should perform copy-on-modify automatically
to avoid the programmer having to make this decision. Thus either make
the manual more precise so it says exactly which functions work in place
and which make copies (this may be too restrictive), or implement some kind
of readonly memory i.e. copy-on-write. Many machines don't have a way to
do this in hardware (trapping on modify, causing LISP to punt and copy first
then try the modify again), but this could be done within the tagged or
paged LISP architecture. In a tagged system such as PSL, simply have two
different tags on string-pointers, one that is normal, and one that is
DON'T EVER MODIFY THIS IN PLACE. The string-modifying operations would
discriminate between these two tags, whereas normal string stuff would just
accept both as strings and pass the tag along when building into structure.
In a paged system such as BIBOP, readonly strings could be on special pages.

Are there any CL implementations which don't use BIBOP nor a tagged
architecture, where there is no obvious method for protecting PNAMEs
against accidental modification in place?