Skip to content

6.11. Custom Allocators #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 31, 2016
Merged

Conversation

dalance
Copy link
Contributor

@dalance dalance commented Jan 28, 2016

ひとまず翻訳完了しました。
ソースコード中のコメントは削除するとのことでしたが、結構分量がありましたので
確認の際に比較しやすいかと思い、とりあえず残してあります。
訳に問題がなくなった時点で削除しようと思います。
よろしくお願いします。

@dalance dalance changed the title [WIP] 6.11. Custom Allocators 6.11. Custom Allocators Jan 29, 2016
<!-- allocate and deallocate memory. The standard library is not compiled assuming -->
<!-- either one, and the compiler will decide which allocator is in use at -->
<!-- compile-time depending on the type of output artifact being produced. -->
現在コンパイラは `alloc_system` と `alloc_jemalloc` (いくつかのターゲットにはありません)という2つの既定のアロケータを提供しています。これらのアロケータは単に普通のRustのクレートで、メモリの割り当てと解放の手続きを実装しています。標準ライブラリはどちらか一方を前提としてコンパイルされているわけではありません。コンパイラは生成する成果物の種類に応じてどちらのアロケータを使用するかをコンパイル時に決定します。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nits]

いくつかのターゲットにはありません

ここのsomeは「いくつかの」の意味ではなくそういうものもある、の意味と思います。なので
「jemallocがないターゲットもあります」はどうでしょう。

@KeenS
Copy link
Member

KeenS commented Jan 30, 2016

コメントしました。[WIP]を外したタイミングでpingを飛ばして頂けるとレスポンスが早くなります。

コードブロックのコメントの原文についてはここで考えた方が良さそうですね。何か良いアイディアありますか?

@dalance
Copy link
Contributor Author

dalance commented Jan 30, 2016

コードブロックのコメントですが、以下のように行頭に'# `を付けると(少なくとも見た目上は)コメントアウトできるような気がしますが、
どうでしょうか?
rustbookとMarkdownの仕様をよく知らないので、使い方が間違っているかもしれませんが・・・

# // original comment
// 訳文

書いてから気づきましたが、'# 'はRunするときに有効になるのですね。
だとすると '# //'の追加ならそちらへも影響なくいけるでしょうか?

@dalance
Copy link
Contributor Author

dalance commented Jan 30, 2016

ご指摘いただいた部分の修正と、漏れていた部分の追加を行いました。
また、コードブロックコメントは'# //'を行頭に追加する方式にしてみました。
(問題があれば再度修正します)
手元のrustbookをかけてみたところでは、HTML上に表示されないことと
Runしたときにコメントになっていて実行に影響がないことは確認しました。

@KeenS
Copy link
Member

KeenS commented Jan 31, 2016

また、コードブロックコメントは'# //'を行頭に追加する方式にしてみました。
(問題があれば再度修正します)

良さそうですね。ソースコード中のコメントはこの方式にしましょう。

@KeenS
Copy link
Member

KeenS commented Jan 31, 2016

対訳表がコンフリクトしたのでそこだけ修正お願いします。

@dalance
Copy link
Contributor Author

dalance commented Jan 31, 2016

対訳表を修正しました。

@KeenS
Copy link
Member

KeenS commented Jan 31, 2016

ありがとうございます。マージします。

KeenS added a commit that referenced this pull request Jan 31, 2016
@KeenS KeenS merged commit a78ef7c into rust-lang-ja:master Jan 31, 2016
@tatsuya6502 tatsuya6502 modified the milestone: 1.6 Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants