test threading memory usage