>>>>> On Sun, 13 Nov 2005 19:24:34 +0000, David Reitter <[EMAIL PROTECTED]> >>>>> said:
> On 13 Nov 2005, at 06:39, YAMAMOTO Mitsuharu wrote: >> So, if there's a non-pure object that is only pointed to by pure >> objects, which may happen if the assumption for the pure storage is >> violated, then the object is reachable but get collected. > OK, that makes sense. Do you know if this is documented somewhere? I'm not sure if it is explicitly documented. I just read src/alloc.c. The function `mark_object' immediately returns if its argument is a pure object. > I've read the info nodes about pure storage etc., and it doesn't say > anything about what to look for in code, or if there is a way to > test for the effect while loading. Maybe on a port that implements > memory protection? Setting watchpoint to the variable `pure' will do run-time check. It is really feasible in GDB on Mac OS X thanks to hardware watchpoints. > I mostly just preload code, but define a setup function in each > package that is run at runtime. But from what you are saying, I am > getting that vectors are allocated when the file is loaded, and not > copied when a function is called. But if the code used (vector 0 0 0 > 0 0) instead of [0 0 0 0 0], the vector would be allocated at > runtime and we don't run into such trouble. Yes, but a vector is created on every call then. > Does this apply only to vectors? (Since vectors seem immutable to > me, this all would make sense...) Literal strings and conses, as well as several vector-like objects. I don't understand what "vectors seem immutable" means above. Vectors are mutable in the sense that one can alter their contents. YAMAMOTO Mitsuharu [EMAIL PROTECTED] _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug