[cl-ppcre-devel] Excessive Memory Usage by CREATE-SCANNER

Volkan YAZICI yazicivo at ttnet.net.tr
Fri Jul 6 09:31:03 UTC 2007


Hi,

While trying to build a parse tree list using CREATE-SCANNER, in the
attempts after first 2-3 tries, below code exhausts the whole system
memory and halts the system.

(defparameter *markup-transformations*
  (loop for (element syntax) on
	(list
	 ;; Link formatting.
	 :link-internal "\\[\\["
	 :link-external "\\[http://"
	 :link-external "\\[https://"
	 :link-external "\\[ftp://"
	 ;; Text formatting.
	 :text-italic-bold "'''''"
	 :text-italic "'''"
	 :text-bold "''"
	 :text-underline "\\_\\_"
	 :text-monospace "`"
	 :text-superscript "\\^"
	 :text-subscript ",,"
	 ;; Formattings requiring a fresh line.
	 :header-3 "\\n=== "
	 :header-2 "\\n== "
	 :header-1 "\\n= "
	 :code-start "\\n{{{"
	 :code-end "\\n}}}"
	 :blockquote "\\n  ")
	by #'cddr collect
	(list element (cl-ppcre:create-scanner
		       (string-append "^" syntax)))))

After 15 minutes, still no OOM reactions. (SBCL 1.0.6) So I needed
restart the machine. (And therefore, I cannot narrow down the
problematic part of the code by bisectioning.) Do you have any ideas
about the erronous line?


Regards.



More information about the Cl-ppcre-devel mailing list