#!/bin/bash
# app.sh <heap_MiB> <hot_file> <mode> [mode args...] : one "application" = a heap
# (anonymous memory) plus the code/data it keeps executing/reading (file-backed
# pages). Both processes live in the same cgroup, like a real service/container.
L=/home/ec2-user/lab
heap=$1; file=$2; shift 2
$L/anon-hog "$heap" 500 &
exec $L/file-hot "$file" "$@"
