4 ms·
I am using it a euphemism for reserving address space and then committing pages as your list grows. This isn't preallocating memory, just address space. But po
by sitkack 2y ago
I am using it a euphemism for reserving address space and then committing pages as your list grows. This isn't preallocating memory, just address space.
But pool allocation works as well. The idea is to go from a chonky representation to a portable compact representation of a C-struct but still have the Python accessors to this data look idiomatic.
- zahlman 2y agoIn what sense is reserving address space not "preallocating memory"? It might not be allocated to an object, but it certainly is allocated to your process... yes?
- Wumpnot 2y agoNo address space does not mean you have memory, you can reserve gigabytes of address space and your process will still show nothing allocated until you commit it.
- zahlman 2y agoAh, of course. Never mind me; when I learned low-level concepts, hardware was much simpler (and so were operating systems).