Tim Peters <tim.one@comcast.net> writes: > calling malloc/free even when pymalloc is enabled. Anyone think > they know a reason (other than theoretical purity <wink>) for why > pymalloc only targets the PyObject family? I think the original rationale is that it does not really pay to allocate other things with the object allocator: a pool allocator is really good if you have many equal-sized object, but may waste a lot of memory if you use it to manage arbitrary-sized memory blocks. Also, for "large" requests, it forwards to system malloc. In the current configuration, "large" requests are those larger than 64 bytes. If obmalloc would be used for all Python allocation requests, it would need to forward to malloc much more often; this may be undesirable and will certainly slow allocations for large chunks. OTOH, I wonder whether the 64 byte limit is a bit small. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4