sapporocpp / mokumoku

0 stars 0 forks source link

2020/05/13 もくもく会 #216 #219

Open maraigue opened 4 years ago

maraigue commented 4 years ago

自作のコンテナ型から、与えられたアロケータを呼んで使う方法を確認し、 https://github.com/maraigue/LTOList に実装する

ignisan commented 4 years ago

前回のRustの続き、

maraigue commented 4 years ago

ひとまず実装できた。ただテストはできていない。(特に、メモリが正しく解放されているのか)

「自作のアロケータを使う」ことに比べて「自作のコンテナでアロケータを使う」ことは記事が少なく、情報を集める段階で少し苦戦していた。 あとrebindということが必要というのにすぐ気づけなかった(今回のコンテナ型は、値1つのallocationができればよいだけではなく、二分探索木のノードのallocationもできないとならない。もとい、値1つのallocationは要らなかった)

参考にした記事 https://programming-place.net/ppp/contents/cpp/library/032.html https://cpprefjp.github.io/reference/memory/allocator_traits.html

maraigue commented 4 years ago

来週試す

C/C++でのユニットテストによるメモリリーク検出 - 千里霧中 http://goyoki.hatenablog.com/entry/2014/03/31/003736

ignisan commented 4 years ago

https://doc.rust-lang.org/book/ のChapter2まで終わった