1 // Vectors are allocated in the Rust kernel's memory region, use of
2 // which requires some amount of synchronization. This test exercises
3 // that synchronization by spawning a number of tasks and then
4 // allocating and freeing vectors.
13 uint::range(0u, n) {|i|
15 vec::reserve(v, 1000u);
19 fn main(args: [str]) {
21 if vec::len(args) < 2u {
23 } else { uint::parse_buf(str::bytes(args[1]), 10u) };
24 uint::range(0u, 100u) {|i| task::spawn(copy n, f); }