Rewrite critical search inner loop in C for speed.
[virt-mem.git] / lib / virt_mem.mli
1 (* Memory info for virtual domains.
2    (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
3    http://libvirt.org/
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 2 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *)
19
20 type ksym = string
21   (** A kernel symbol name. *)
22
23 type image =
24     string
25     * Virt_mem_utils.architecture
26     * ([`Wordsize], [`Endian]) Virt_mem_mmap.t
27     * (ksym -> Virt_mem_mmap.addr)
28   (** An image after it has been processed by the code common to
29       all commands.
30
31       The tuple fields are:
32       - name
33       - architecture (eg. I386)
34       - kernel memory map (wordsize & endianness already determined)
35       - a function to look up kernel symbols.  It raises [Not_found]
36         if a kernel symbol could not be found or if the kernel symbol
37         table could not be found at all.
38   *)
39
40 val start : Arg.usage_msg -> bool * image list
41   (** Programs call this to parse the standard command-line arguments
42       and do all the standard processing of domains into images.
43
44       The returned tuple is:
45       - verbose mode
46       - list of images
47   *)