apps/speed.c: Lock buffer in memory