Python Memory Management and Tips Transcripts
Chapter: Allocating memory in Python
Lecture: Allocation introduction

Login or purchase this course to watch this video and the rest of the course contents.
0:00 When you think about Python memory management, you're very likely thinking about reference counting, garbage collection,
0:07 how things get cleaned up. But memory doesn't start there. It starts by getting allocated, and it turns out that Python has a whole bunch
0:16 of techniques and patterns and ideas around making allocation fast, efficient, doing things
0:24 so there's not memory fragmentation, all of those kinds of things. Allocation in Python is actually way more interesting than you would think.
0:34 So we're going to spend some time talking about the core algorithm, using pools and blocks and arenas, which maybe you've never heard of,
0:42 but all of these things are really important in working with objects to prevent memory fragmentation
0:48 and prevent them from blowing up in terms of taking too much memory and so on.
0:52 So this will be really a fun and important prerequisite before we get to what most people think when they think of Python memory, and that's the
0:59 cleaning up side of all that.

Talk Python's Mastodon Michael Kennedy's Mastodon