ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> modperl
modperl
Re: Apache.xs patch for get_client_block
by other posts by this author
Aug 31 2000 5:15PM messages near this date
Re: PassEnv (passing everything) | Re: Apache.xs patch for get_client_block
Doug,

Sorry to belabor a dull issue, but I'm not sure I'm getting my point across.

Most of the troubles I've run across in the mod_perl and libapreq code
have to do with attempts to allocate memory resources for buffers 
at runtime.  That's exactly what the BUFF API does, right?

What I'm seeing is that you are also resizing/reallocating these buffers
each time the code is called. For instance, the original 
get_client_block had this line in it:

>  -    buffer = (char*)palloc(r->pool, bufsiz);

The one you just sent me has this line instead:

>  +    SvGROW(buffer, bufsiz+1);

I'm not sure what SvGROW does, but if it involves a malloc
without freeing the old buffer, you've got the same problem as before.  
Each time the perl version of get_client_block is called, 
SvGROW will work it's majic on RAM, and perl won't give that RAM
back to the OS. 

Best.
-- 
Joe Schaefer
joe@[...].com

SunStar Systems, Inc.
Thread:

Billy Donahue
Doug MacEachern

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved