検索

phrase: max: clip:
target: order:
Results of 11 - 16 of about 16 for mem (0.027 sec.)
アロケーティング 7555
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... こうなります: #![feature(alloc, heap_api)] use std::mem; use alloc::heap::EMPTY; impl<T> Vec<T> { fn new() ... f { // まだ ZST を扱う準備が出来ていません assert!(mem::size_of::<T>() != 0, "We're not ready to handle Z ... 対話できるようになります。 また、メモリ不足 (out-of-memory, OOM) の状態に対処する方法も必要です。 標準ライ ... ンメントを手動で指定する必要があります。 let align = mem::align_of::<T>(); let elem_size = mem::size_of::<T ...
https://man.plustar.jp/rust/nomicon/vec-alloc.html - [similar]
借用の分割 7468
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... } } これは可変スライスです。 fn main() {} use std::mem; pub struct IterMut<'a, T: 'a>(&'a mut[T]); impl<' ... ext(&mut self) -> Option<Self::Item> { let slice = mem::replace(&mut self.0, &mut []); if slice.is_empty( ... ack(&mut self) -> Option<Self::Item> { let slice = mem::replace(&mut self.0, &mut []); if slice.is_empty( ...
https://man.plustar.jp/rust/nomicon/borrow-splitting.html - [similar]
print.html 7468
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... を実行します。自由自在にメモリ安全性に違反できます。 mem::transmute は、型安全の仕組みを好きなようにすり抜け ... er_str, &mut &*string); } // Oops, printing free'd memory println!("{}", forever_str); } The signature of ... y be dropped, and forever_str would point to freed memory when we print it! Therefore &mut should be inva ... g. If you change T's type, then the source still remembers the original type. However if you change the l ...
https://man.plustar.jp/rust/nomicon/print.html - [similar]
レイアウト 7381
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... marker::PhantomData; use std::ops::Deref; use std::mem; struct Unique<T> { ptr: *const T, // 変性のために ... ポインタ" ですのでトランスミュートします。 unsafe { mem::transmute(&self.ptr) } } } fn main() {} 残念ながら ...
https://man.plustar.jp/rust/nomicon/vec-layout.html - [similar]
Vec の実装 7018
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... 場において安定版になっていますが ( std::ptr や std::mem は、 多くの intrinsic を含んでいます) 。 究極には、 ...
https://man.plustar.jp/rust/nomicon/vec.html - [similar]
安全と危険の相互作用 6740
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... を実行します。自由自在にメモリ安全性に違反できます。 mem::transmute は、型安全の仕組みを好きなようにすり抜け ...
https://man.plustar.jp/rust/nomicon/safe-unsafe-meaning.html - [similar]
PREV 1 2 NEXT