Thanks for your reply.  Now I've two questions,

1. as you said, 'memory leaks' , could it be released with GC module?

2. about 'VmSize',  in my test program, I printf it firstly, then re-printf 
it after Function 'free', it exactly reduces. 
With destroying sub-interpreter, I also found the func 'free' is invoked 
several times ( i use gdb attch $pid), 
but Why the ‘VmSize’ is constant?


在 2012年9月15日星期六UTC+8下午1时27分34秒,Graham Dumpleton写道:
>
> Why do you have so many applications (as subinterpreters) in the same 
> process? And what exactly are you trying to do? You may be going about 
> this in the completely wrong way. 
>
> Now, should also be stated that destroying Python sub interpreters 
> with a process is error prone and can result in memory leaks. This is 
> partly due to flaws in Python, but also any C extension modules you 
> may use. 
>
> Also, your idea that VmSize will drop when a sub interpreter is 
> destroyed is somewhat flawed anyway because except for some special 
> cases, once a process allocates memory from the operating system 
> level, it doesn't get released back to the operating system and 
> instead only ends up back on the free list of that process for future 
> reuse within the same process. 
>
> Graham 
>
> On 12 September 2012 23:36, pytom <[email protected] <javascript:>> 
> wrote: 
> > hi~ alls, 
> > 
> > In mod_wsgi, each of applications has a sub-interpreter, and there're 
> more 
> > applications with more sub-interpreter, the memory will be exhausted. 
> > 
> > So I want to destroy someones with 
>  PyDict_DelItemString(wsgi_interpreters, 
> > $appgrp), it'll invoke Interpreter_dealloc to end sub-interpreter. 
> > 
> > But unfortunately, the Memory Used is not slow down. I found 'VmSize' 
> was 
> > same as before in /proc/$pid/status. 
> > 
> > Someone could help me, Thanks a lot~ 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "modwsgi" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/modwsgi/-/t48gfUNoPmEJ. 
> > To post to this group, send email to [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:>. 
> > For more options, visit this group at 
> > http://groups.google.com/group/modwsgi?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/Pbpcmq8gcPUJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to