Jay Savage schrieb: > Hi Patrick, > > This is hardly a beginner question, and as such is a bit out of scope > for this list. If you're really interested in Perl internals, you'll > probably want to check out the alt.lang.perl.misc newsgroup. > Yes, you're right. I thought a couple of people did hit the memory footprint issue and could help. > The real question, though, is why do you care. One of main advantages > of Perl over other programming languages it its approach to automatic > memory allocation and garbage collection. That variables are > abstracted from memory location, and that the the programmer doesn't > ever have to deal with malloc() and free() calls is, in most people's > opinion, one of Perl's strongest selling points. That Perl normally > allocates more memory than it needs in order to speed up string > concantenation and list expansion is usually considered a feature, > too. > I do understand. Perl is a scripting language, which was maybe not intended to run such jobs. But let me think your argument a bit further: - there is a really helping language, which you want to use and in a runtime scenario it displays a high memory footprint because it is reserving memory which is not be used again. I mean, why counting references of a variable, when at the side effect the variable's memory is not fully released at the end. As far as I recognized it, the variable goes together with there lexical names in the symbol table. But how often is the same lexical variable name used in a program (beside run-time-counting variables [like i, j, k etc.])?
As long the programming style is object oriented (as far as Perl assures it, I target, in special, the encapsulation, the locality principle of variables). > If you are programming in an environment where performing memory > deallocation in real time concureently with variable de-initialization > is important for some reason, though, googling "perl internals" will > turn up some useful results that you can use as a jumping off point > for posting some specific questions on alt.lang.perl.misc and/or the > Perl Monks site. > I also stressed Google with this topic, but as you know, formulating the right question is the problem. I ended too often in some forum with troll posts :-/ . Perhaps you have better idea/or a course on 'How do I Google the right way, to answer my specific question' :-) ? This is a good hint. I will do so. > If there are only specific variables or specific parts of your program > that are of concern, though, you might just want to investigate the XS > interface (`perldoc perlxs`), or the Inline::C module. > > HTH, > Thanks, > -- jay > -------------------------------------------------- > This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] > private and confidential > > daggerquill [at] gmail [dot] com > http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org > > values of β will give rise to dom! > -- Patrick Kirsch -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/