Python, Linkers, and Virtual Memory

Python

Video is ready, Click Here to View ×


Brandon Rhodes
Why does “top” show that your Python process uses 110 MB of virtual memory but has a resident set size of 9 MB? Does it consume more memory to spawn several interpreters, or to run one Python and have it fork() further workers? What is

6 thoughts on “Python, Linkers, and Virtual Memory

  1. That bit at 14:38 about needing the .a at link time because necessary metadata isn't present in the .so is false; the reason you need the lxml-dev package is just because it installs a /usr/lib/libxml2.so symlink to /usr/lib/libxml2.so.2.7.8 (and any needed header files); you tell the linker to link "-lxml2", which it pattern-replaces to "libxml2.so" and tries to find. Without the symlink, that search will fail. (On Windows he'd be right; you need a .lib at link time even when you'll use a .dll at run-time.)

Leave a Reply

Your email address will not be published. Required fields are marked *