Debian Codegraph @

examples/node-alloc.pl

raw
1 #!/usr/bin/perl
2
3 use Sys::Virt;
4
5 if (int(@ARGV) < 2) {
6 die "syntax: $0 URI PAGESIZE=1COUNT1 PAGESIZE2=COUNT2...";
7 }
8
9 my $uri = shift @ARGV;
10
11 my $c = Sys::Virt->new(uri => $uri);
12
13 my @pages;
14 foreach (@ARGV) {
15 my @bits = split /=/;
16
17 push @pages, \@bits;
18 }
19
20
21 $c->node_alloc_pages(\@pages, -1, -1);