Re: Controlling memory allocation

2005-09-05 Thread Tommy . Ryding
Yep! I redirect Free, Realloc and Malloc. (calloc is never used by Python). "The more I thoug..." That could be a possible problem. I will look in to it today and try and find out if that occurs and in that case how often. //T -- http://mail.python.org/mailman/listinfo/python-list

Re: Controlling memory allocation

2005-09-05 Thread cwoolf
Good to know that works :) Did you also do the same for free and realloc to keep up with your accounting? The more I thought about it, the more I realized that calls to other library functions could cause address space expansion if that code internally called malloc or mmap. See, I can use the O

Re: Controlling memory allocation

2005-09-05 Thread Tommy . Ryding
Hello. I have done the thing you are requesting. You can easily create your own memory pool and have Python to use it. I added some rows to Pyconfig.h: #ifdef malloc #undef malloc #endif /*malloc*/ #define malloc Python_malloc Then I have some overhead in my own Python_malloc(size_t nBytes) --