- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Message69482
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | jlaurila |
|---|---|
| Recipients | jlaurila |
| Date | 2008-07-09.19:48:50 |
| SpamBayes Score | 0.0008442137 |
| Marked as misclassified | No |
| Message-id | <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Currently Python always uses the C library malloc/realloc/free as the underlying mechanism for requesting memory from the OS, but especially on memory-limited platforms it is often desirable to be able to override the allocator and to redirect all Python's allocations to use a special heap. This will make it possible to free memory back to the operating system without restarting the process, and to reduce fragmentation by separating Python's allocations from the rest of the program. The proposal is to make it possible to set the allocator used by the Python interpreter by calling the following function before Py_Initialize(): void Py_SetAllocator(void* (*alloc)(size_t), void* (*realloc)(void*, size_t), void (*free)(void*)) Direct function calls to malloc/realloc/free in obmalloc.c must be replaced with calls through the function pointers set through this function. By default these would of course point to the C stdlib malloc/realloc/free. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-07-09 19:48:53 | jlaurila | set | spambayes_score: 0.000844214 -> 0.0008442137 recipients: + jlaurila |
| 2008-07-09 19:48:53 | jlaurila | set | spambayes_score: 0.000844214 -> 0.000844214 messageid: <1215632933.18.0.0332019532518.issue3329@psf.upfronthosting.co.za> |
| 2008-07-09 19:48:51 | jlaurila | link | issue3329 messages |
| 2008-07-09 19:48:50 | jlaurila | create | |

