1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Have `gc-profile.scm' make sure it's on a Linux-based system.

* gc-benchmarks/gc-profile.scm (memory-mappings): Check %HOST-TYPE for
  "-linux-".
This commit is contained in:
Ludovic Courtès 2011-03-06 22:27:53 +01:00
parent 364b6eb7cf
commit 821eca02eb

View file

@ -47,6 +47,9 @@ memory mapping of process @var{pid}. This information is obtained by reading
(make-regexp
"^Rss:[[:blank:]]+([[:digit:]]+) kB$"))
(if (not (string-contains %host-type "-linux-"))
(error "this procedure only works on Linux-based systems" %host-type))
(with-input-from-port (open-input-file (format #f "/proc/~a/smaps" pid))
(lambda ()
(let loop ((line (read-line))