aboutsummaryrefslogtreecommitdiffstats
path: root/case-mremap-xread-rand-mt
blob: a1cc3879ee5fe343e00f4f2d5cbdb5b37a4295b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

#
# Exercises code in mremap.c of mm/
#
# First creates a sparse file and then maps it to the VM of calling
#
# process. Then remaps it after scaling it by SCALE_FACTOR defined in usemem.
#

. ./hw_vars

create_sparse_file $SPARSE_FILE $ROTATE_BYTES
$USEMEM -t $nr_task -f $SPARSE_FILE -E --prealloc --readonly --random $((ROTATE_BYTES / nr_task))

rm $SPARSE_FILE