Skip to content

Commit d631d09

Browse files
authored
Translate uninitialized.md (#38)
1 parent 57f3002 commit d631d09

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* [ドットオペレータ](dot-operator.md)
2626
* [キャスト](casts.md)
2727
* [Transmutes](transmutes.md)
28-
* [Uninitialized Memory](uninitialized.md)
28+
* [初期化されないメモリ](uninitialized.md)
2929
* [チェックされるメモリ](checked-uninit.md)
3030
* [Drop Flags](drop-flags.md)
3131
* [Unchecked](unchecked-uninit.md)

src/uninitialized.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
<!--
12
# Working With Uninitialized Memory
3+
-->
24

5+
# 初期化されないメモリを扱う
6+
7+
<!--
38
All runtime-allocated memory in a Rust program begins its life as
49
*uninitialized*. In this state the value of the memory is an indeterminate pile
510
of bits that may or may not even reflect a valid state for the type that is
611
supposed to inhabit that location of memory. Attempting to interpret this memory
712
as a value of *any* type will cause Undefined Behavior. Do Not Do This.
13+
-->
14+
15+
すべての Rust の、実行時にアロケートされるメモリは、最初に*初期化されません*
16+
この状態では、メモリ上の値は、そのメモリ番地にあると想定される型の、正しい状態を
17+
反映しているかもしれないし、していないかもしれないビットの無限の山です。
18+
このメモリを*いかなる*型の値として解釈しようとしても、未定義動作を引き起こすでしょう。
19+
絶対にしないでください。
820

21+
<!--
922
Rust provides mechanisms to work with uninitialized memory in checked (safe) and
1023
unchecked (unsafe) ways.
24+
-->
25+
26+
Rust では、初期化されていないメモリを扱う、チェックが入る (安全な) 方法と、
27+
チェックされない (アンセーフな) やり方があります。

0 commit comments

Comments
 (0)