cool.. need to change the /home/scapor/ hardcoded :P
need to add image names..
need to create that memleaks array where each key is the size of the variable, and the value is the list of all variables with the same size.. I know I sent it.. anyways, rewriting the poc :

set size [string length [array get $var]/$var]
lappend memleaks($size) $var
...
# at the end
puts "Variable names sorted by the size : "
foreach size [lsort [array names memleaks]] {
   puts "$size bytes used by variables : [set memleaks($size)]"
}


KKRT

On Wed, 19 Apr 2006 17:46:40 -0400, Karel Demeyer <[EMAIL PROTECTED]> wrote:

For those interested (to extend it maybe, have the figures in an array
and then have some shiny graphics :p), check attachement.


Op wo, 19-04-2006 te 15:33 -0400, schreef Youness Alaoui:
On Wed, 19 Apr 2006 15:09:24 -0400, Boris Faure (aka billiob)
<[EMAIL PROTECTED]> wrote:

> About the http memleak, if you're using pop3 and gmail account, please
> update it (i've fixed it a few days ago).
>

nope, not using any plugins apart from : nudge/cam shooter


> Maybe we can use the profiler from tcllib (but i don't know how it works)
>

really easy to use, just read the man page

>> From a previous message from Youness :
> set fd [open log w]; foreach var [info globals] {global $var; puts $fd
> "$var : " ; catch {puts $fd "[string length [set $var]]\n"} ; catch
> { puts
> $fd "[string length [array get $var]]\n"} }; close $fd
>
> set fd [open log w]; foreach namespace [namespace children ::] {foreach > var [info vars "${namespace}::*"] {puts $fd "$var : " ; catch {puts $fd > "[string length [set $var]]\n"} ; catch { puts $fd "[string length [array
> get $var]]\n"} }  }; close $fd
>

yeah, something like that.. could be improved probably... instead of
catch, could be if array exists..
and we could do :
set length [string lenght ...]
lappend memleaks($length) $var
...
# at the end
foreach size [lsort [array names memleaks]] {
puts "memory used : $size by variables : [set memleaks($size)]"
}

or similar.. many many improvements to the code can be done to make it
look for all memleaks.. procs, commands, vars, arrays, images, etc..



>
> --
> Boris FAURE (aka billiob)
> mail, msn : [EMAIL PROTECTED]
> No trees were killed in the sending of this message.
> However, a large number of electrons were terribly
> agitated.
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
> _______________________________________________
> Amsn-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel






--
KaKaRoTo


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to