![]() The solution is to push a pointer to the temporary structure onto GCStack so that it will be marked during garbage collection. ![]() Now, if the corruption only occurs after a garbage collection it's probably due to an unprotected temporary structure. To debug this situation, turn off the call to gc() in repl(), by commenting out the line: gc(NULL, env) Īlso, turn on the printing of garbage collections, by uncommenting: #define printgcs The resource for software developers working with AutoCAD and other cross-market technologies from AutoCAD. For example, if your extension to uLisp is constructing a list, it's important to make sure that it doesn't get garbage collected while it is being constructed. ACL2 consists of a first-order func- tional programming language, a logic for that language, and an industrial-strength automatic. Unpredictable corruptions are often the result of garbage collection having an effect on temporary Lisp structures. For example, to print the Lisp object arg to the serial output you can add a statement such as: printobject(arg, pserial) Debugging the effect of garbage collections ![]() When writing your own extensions to uLisp it's useful to be able to print out Lisp objects at different points in the code.
0 Comments
Leave a Reply. |