/[cmucl]/src/code/vm.lisp
ViewVC logotype

Contents of /src/code/vm.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Mar 19 15:19:00 2010 UTC (4 years, 1 month ago) by rtoy
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, post-merge-intl-branch, release-20b-pre1, release-20b-pre2, sparc-tramp-assem-2010-07-19, GIT-CONVERSION, cross-sol-x86-merged, RELEASE_20b, cross-sol-x86-base, snapshot-2010-12, snapshot-2010-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-08, cross-sol-x86-2010-12-20, cross-sparc-branch-base, HEAD
Branch point for: cross-sparc-branch, RELEASE-20B-BRANCH, sparc-tramp-assem-branch, cross-sol-x86-branch
Changes since 1.3: +4 -2 lines
Merge intl-branch 2010-03-18 to HEAD.  To build, you need to use
boot-2010-02-1 as the bootstrap file.  You should probably also use
the new -P option for build.sh to generate and update the po files
while building.
1 ;;; -*- Log: code.log; Package: MACH -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;; This code was written as part of the CMU Common Lisp project at
5 ;;; Carnegie Mellon University, and has been placed in the public domain.
6 ;;;
7 (ext:file-comment
8 "$Header: /tiger/var/lib/cvsroots/cmucl/src/code/vm.lisp,v 1.4 2010/03/19 15:19:00 rtoy Rel $")
9 ;;;
10 ;;; **********************************************************************
11 ;;;
12 ;;; $Header: /tiger/var/lib/cvsroots/cmucl/src/code/vm.lisp,v 1.4 2010/03/19 15:19:00 rtoy Rel $
13 ;;;
14 ;;; This file contains stubs for interfacing MACH's vm primitives.
15 ;;;
16 (in-package "MACH")
17
18 (intl:textdomain "cmucl")
19
20 (export '(vm_allocate vm_copy vm_deallocate vm_statistics))
21
22 (def-c-pointer *sap system-area-pointer)
23
24
25 (def-c-routine ("vm_allocate" vm_allocate) (int)
26 (task port)
27 (address *sap :in-out)
28 (size unsigned-long)
29 (anywhere boolean))
30
31 (def-c-routine ("vm_copy" vm_copy) (int)
32 (task port)
33 (source system-area-pointer)
34 (count unsigned-long)
35 (dest system-area-pointer))
36
37 (def-c-routine ("vm_deallocate" vm_deallocate) (int)
38 (task port)
39 (address system-area-pointer)
40 (size unsigned-long))
41
42
43
44
45 ;;;; vm_statistics
46
47 (def-c-record vm_statistics
48 (pagesize long)
49 (free_count long)
50 (active_count long)
51 (inactive_count long)
52 (wire_count long)
53 (zero_fill_count long)
54 (reactivations long)
55 (pageins long)
56 (pageouts long)
57 (faults long)
58 (cow_faults long)
59 (lookups long)
60 (hits long))
61
62 (def-c-routine ("vm_statistics" %vm_statistics) (int)
63 (task port)
64 (vm_stats system-area-pointer))
65
66 (defun vm_statistics (task)
67 (with-stack-alien (vm_stats vm_statistics (c-sizeof 'vm_statistics))
68 (values
69 (%vm_statistics task (alien-sap (alien-value vm_stats)))
70 (alien-access (vm_statistics-pagesize (alien-value vm_stats)))
71 (alien-access (vm_statistics-free_count (alien-value vm_stats)))
72 (alien-access (vm_statistics-active_count (alien-value vm_stats)))
73 (alien-access (vm_statistics-inactive_count (alien-value vm_stats)))
74 (alien-access (vm_statistics-wire_count (alien-value vm_stats)))
75 (alien-access (vm_statistics-zero_fill_count (alien-value vm_stats)))
76 (alien-access (vm_statistics-reactivations (alien-value vm_stats)))
77 (alien-access (vm_statistics-pageins (alien-value vm_stats)))
78 (alien-access (vm_statistics-pageouts (alien-value vm_stats)))
79 (alien-access (vm_statistics-faults (alien-value vm_stats)))
80 (alien-access (vm_statistics-cow_faults (alien-value vm_stats)))
81 (alien-access (vm_statistics-lookups (alien-value vm_stats)))
82 (alien-access (vm_statistics-hits (alien-value vm_stats))))))
83

  ViewVC Help
Powered by ViewVC 1.1.5