newLISP core development expectations

Started by noah, July 22, 2006, 02:32:51 PM

Previous topic - Next topic

noah

#15
Hi, Lutz.



Here are some suggested edits to the newly-posted rev 13 version of the Automatic Memory Management document.



-Noah



- This article explains how ORO memory mangement works.
+ This article explains how ORO memory management works.

- A ireference-counting scheme registers each allocated memory object together with a count of references to the object.
+ A reference-counting scheme registers each allocated memory object together with a count of references to the object.

- When newLISP reaches a higher evaluation level, it removes the last evaluation results reference from the result stack and deletes the evaluation result's memory object.
+ When newLISP reaches a higher evaluation level, it removes the last evaluation result's reference from the result stack and deletes the evaluation result's memory object.

- If a list is packaged int a context (a namespace) in newLISP, then newLISP can pass the list by reference.
+ If a list is packaged in a context (a namespace) in newLISP, then newLISP can pass the list by reference.

- Arrays in newLISP are LISP cells allocated in memory in a linear fashion for faster random access when using indices. Only a subset of the list functions can be used on arrays. Automatic memory management in newLISP handles arrays similar to lists.
+ newLISP allocates an array as a group of LISP cells. The LISP cells are allocated linearly. As a result, array indices have faster random access to the LISP cells. Only a subset of newLISP list functions can be used on arrays. Automatic memory management in newLISP handles arrays in a manner similar to how it handles lists.

- Refererences
+ References

- Addision Wesley Publishing Company
+ Addison-Wesley Publishing Company


tom

#16
Quote from: "Lutz"
Last night I tried to install dokuwiki, but had problems it recognizing the data directory. All permissions, ownerships where correct but I couldn't get it to work. I liked the fact that it had a revision mechanism and probably a way to see differences in edits too.


With an rss feed straight to the diff, too.  Did you maybe forget to

touch "changes.log" in the data directory?  That got me once.

Lutz

#17
Thanks for the last edits Noah and thanks for the dokuwiki tip Tom, I will try it again.



Lutz

noah

#18
Hi, Lutz.



My time has suddenly been crunched. I'll return to start on QA work when I'm able.



-Noah

wfaxon

#19
Hi.



I'm new to newLISP.  I just read the paper "Automatic Memory Management in newLISP" and was very surprised to find the section on traditional garbage collection schemes to be missing the primary method of copying garbage collection (actually a very early method).  For those who don't know about it I point you to the relevant section of a Wikipedia article:



http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Copying_vs._mark-and-sweep">http://en.wikipedia.org/wiki/Garbage_co ... -and-sweep">http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Copying_vs._mark-and-sweep



There may be better descriptions about.  This is a very simple algorithm.  The good thing of course is that the "garbage" cells are never scanned and most traditional lisp programs produce a lot of garbage.  Another good thing is that living cells are compacted together which improves caching.  The bad thing historically is that for the simplest implementation you need twice as much memory as "mark-and-seeep" or "reference count" methods; less of a problem today.  There are many modern GC algorithms based on the copying collector idea.



I also very much wanted to see some actual figures as to the cost of ORO values vs. multiple references in some standard lisp applications.  You're making a bold assertion.  Back it up!



Friend of all lisps,

Walter

Lutz

#20
Quote ... method of copying garbage collection


they are also called scavenger algorithms and described in the Richard Jones/Rafael Lins book referenced at the end of my paper. The two methods mentioned in the paper are those which where specifically developed for LISP in it's early days. Copying and generational algorithms where also used in LISP later, but developed independend of LISP and thoroughly refined and researched for the Smalltalk programming system.



At least for a LISP interpreter newLISPs ORO method of automatic memory management is the best in terms of speed and memory resources used.



Welcome to the newLISP discussion group. I hope newLISP serves your needs and that we can help you to get to know the language.



Lutz