HackerTube 中文?

CppCon 2015: Andrei Alexandrescu “std::allocator...”

CppConYouTube ↗

Further reading 1

Caption notes

At CppCon 2015, Andrei Alexandrescu proposes building memory allocators from small parts that can be combined to handle requests with different strategies. He passes a pointer and length together as a memory block and uses a fallback allocator to explain why the interface also has to account for deallocation. If the first allocator cannot satisfy a request, a second can try. When the block is freed, it has to go back to the allocator that supplied it. In his example, the primary allocator can tell whether it owns a given block.

Archived captions (transcription method unspecified) ↗
Original passages · 2
it has the pointer and the length
CppCon 2015: Andrei Alexandrescu “std::allocator...” · ▶ 8:11–8:18
if you want to write an allocator you got to make it composable
CppCon 2015: Andrei Alexandrescu “std::allocator...” · ▶ 23:34–23:45

Hacker News comments

View original on HN ↗