mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Add `gc.test' hack for SPARC GNU/Linux.
This commit is contained in:
parent
8cd5eae91d
commit
f937ce3741
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-02-15 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* tests/gc.test (gc): Add hack to clean up the stack so that the
|
||||
test passes on SPARC.
|
||||
|
||||
2008-02-01 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* standalone/Makefile.am: Add stanza for test-with-guile-module.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;;; gc.test --- test guile's garbage collection -*- scheme -*-
|
||||
;;;; Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -65,6 +65,15 @@
|
|||
"eval-closure" (gc-live-object-stats)))))
|
||||
|
||||
(for-each (lambda (x) (make-module)) (iota 1000))
|
||||
|
||||
;; XXX: This hack aims to clean up the stack to make sure we
|
||||
;; don't leave a reference to one of the modules we created. It
|
||||
;; proved to be useful on SPARC:
|
||||
;; http://lists.gnu.org/archive/html/guile-devel/2008-02/msg00006.html .
|
||||
(let cleanup ((i 10))
|
||||
(and (> i 0)
|
||||
(begin (cleanup (1- i)) i)))
|
||||
|
||||
(gc)
|
||||
(gc) ;; twice: have to kill the weak vectors.
|
||||
(= last-count (cdr (assoc "eval-closure" (gc-live-object-stats)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue