-----BEGIN PGP SIGNED MESSAGE----- Moin,
On 30-Aug-02 H.Merijn Brand carved into stone: > On Fri 30 Aug 2002 10:33, Elizabeth Mattijsen <[EMAIL PROTECTED]> wrote: >> At 10:30 AM 8/30/02 +0200, H.Merijn Brand wrote: >> > > Being able to do so at any point in Perl's execution would be >> > great. Or is >> > > there such a thing already and I just don't know about it (and I'm >> > > not >> > > thinking about GTop)... >> >I was thinking about highjacking a standard function: read () >> > >> >read filehandle, $var, length [, offset] >> > >> >and use it like >> > >> >read [ \"PERL_status" ], $mem, "memory"; >> > >> >which is very illegal at the moment :) but probably easy to catch in >> >the >> >internals and than we've got a new gate to a welth of internal info :) >> >> What kinds of internal info are you thinking about? > > memory, number of threads, internal variables unseen before > Whatever we can think of, my imagination will have no bounds Just 5 minutes ago I was thinking about a "memory benchmark" to find out how much memory a scalar/array of scalars/Math::Pari/Math::GMP object takes. having a simple way to access and print this would rock, otherwise I would need to do ugly stuff like allocating 100000 and then looking at top to see how much memory it uses. The idea is great! Can I have it? I won't mind: use statistics qw/memory_usage/; use Foo; my $a = Foo->new(); print memory_usage($a),"\n"; print statistics::live_time($a),"\n"; or whatever. Thanx! Tels - -- perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"' completely coordinate third-generation infrastructures http://bloodgate.com/perl My current Perl projects PGP key available on http://bloodgate.com/tels.asc or via email -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. iQEVAwUBPW90qncLPEOTuEwVAQFE5Qf+Nk453DtM3L1IFDsRr6YAc3mDTKBTHoxX SuEpUype3pQMu6cL8Kj4s0p2XiptQyt0Nxws22hhfN0C04kfQIEtD08yMVgq91uK Sct1yBcZVNaqJMi8ySbD6rcQaX9vWfMHP8nj64SPkR9J0HbFxie5g5gMT2CFKTFl iv7aLHyUMktyZ4xr+a3Gmzi+Gfgc6vcIf5lMMkwKsIyx1qU6B5iGLEZQ2Wa7+O+u 5SVQ9fMdvWYheRle92LqN05enSkrc+CBmaIX0YJj4KSoOIiAg7xn3RHdnb4MXG8g 2gvGK2FfbBDo33ebhrq1oGyr3bHaj+1qdAIaWjfNsyARnznkBUGb+g== =xbGK -----END PGP SIGNATURE-----