On 2/19/22 04:41, Antoine Pitrou wrote:
Do applications do that for some reason? Python module reloading is already so marginal, I thought hardly anybody did it. Anyway, my admittedly-dim understanding is that COW is most helpful for the "pre-fork" server model, and I bet those folks never bother to unload modules.On 2022年2月18日 14:56:10 -0700 Eric Snow<[email protected]> wrote:On Wed, Feb 16, 2022 at 11:06 AM Larry Hastings<[email protected]> wrote:He suggested(*) all the constants unmarshalled as part of loading a module should be "immortal", and if we could rejigger how we allocated them to store them in their own memory pages, that would dovetail nicely with COW semantics, cutting down on the memory use of preforked server processes.Cool idea. I may mention it in the PEP as a possibility. Thanks!That is not so cool if for some reason an application routinely loads and unloads modules.
//arry/
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/N7UFJCMQLO6W4HUJ6DL5M55JOU4CEX4K/ Code of Conduct: http://python.org/psf/codeofconduct/