On Sun, 2002-02-24 at 00:33, Chuck Esterbrook wrote:
> 
> I'm using SessionMemoryStore with a time out of 1 on Python 2.1.1 on 
> Linux with Webware cvs. I cleared out my Sessions/*.ses before 
> launching the app server.
> 
> The memory grew and after the sessions had expired (according the Admin 
> servlet), the memory was the same, which smells like a leak, BUT...
> 
> What's also interesting is that when I reran the test program, after 
> expirations, the memory didn't grow anymore except for a couple blips 
> (that came back down).
> 
> It was like Python would not let go of the memory it didn't need, but 
> it was certainly willing to reuse it.

Python is written in C and the usual way the C library (libc6 aka
glibc2) is that only large memory blocks are allocated by mmap and are
released to the OS upon free. For smaller memory blocks the C library
will request more memory for the process and will not return it until
the end of the program.

The memory that is freed is not released to the OS but is reused by the
C library. Ofcourse fragmentation of memory allocation can cause the
need of the C library to request more memory.

I believe that what you see can be attributed to the actions of the C
library and is less likely to be a memory leak in Webware, though that
needs a more explicit checking, which I have no idea how to do. Maybe
Python exports some information on its memory use?

Baruch

p.s. In the last few days I've restarted working with
WebKit/MiddleKit/Cheetah/FFK and it's just so nice, at least once I
figure out the easy way for each component.


_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to