diff options
| author | Rob Arnold <robarnold@cs.cmu.edu> | 2011-07-05 22:55:41 -0700 |
|---|---|---|
| committer | Rob Arnold <robarnold@cs.cmu.edu> | 2011-07-06 20:41:24 -0700 |
| commit | f6117173c9f26efdcf50cb664d006ea2bdf0d0cb (patch) | |
| tree | 04f20cc1e1a057d520b9329e343ef6b63ddb52e9 /src/lib | |
| parent | 2e2e1f7cb36aeac0abb730a752fcd78cf91a380f (diff) | |
| download | rust-f6117173c9f26efdcf50cb664d006ea2bdf0d0cb.tar.gz rust-f6117173c9f26efdcf50cb664d006ea2bdf0d0cb.zip | |
Allocate rust_ivec buffers out of the kernel pool
The duplication of upcalls is due to the fact that the runtime is shared between stage0/rustc and stage1/rustc. Once snapshots are updated, they should be de-duplicated.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ivec.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/ivec.rs b/src/lib/ivec.rs index a9a5509dae9..d34b54d68e4 100644 --- a/src/lib/ivec.rs +++ b/src/lib/ivec.rs @@ -11,15 +11,16 @@ native "rust-intrinsic" mod rusti { } native "rust" mod rustrt { - fn ivec_reserve[T](&mutable T[mutable?] v, uint n); + fn ivec_reserve_shared[T](&mutable T[mutable?] v, uint n); fn ivec_on_heap[T](&T[] v) -> uint; fn ivec_to_ptr[T](&T[] v) -> *T; - fn ivec_copy_from_buf[T](&mutable T[mutable?] v, *T ptr, uint count); + fn ivec_copy_from_buf_shared[T](&mutable T[mutable?] v, + *T ptr, uint count); } /// Reserves space for `n` elements in the given vector. fn reserve[T](&mutable T[mutable?] v, uint n) { - rustrt::ivec_reserve(v, n); + rustrt::ivec_reserve_shared(v, n); } fn on_heap[T](&T[] v) -> bool { @@ -204,7 +205,7 @@ fn all[T](fn(&T)->bool f, &T[] v) -> bool { mod unsafe { fn copy_from_buf[T](&mutable T[] v, *T ptr, uint count) { - ret rustrt::ivec_copy_from_buf(v, ptr, count); + ret rustrt::ivec_copy_from_buf_shared(v, ptr, count); } } |
