You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by st...@apache.org on 2004/08/07 01:34:34 UTC
cvs commit: modperl-docs/src/docs/1.0/guide install.pod
stas 2004/08/06 16:34:34
Modified: src/docs/1.0/guide install.pod
Log:
rewrite the section that talks about using Perl w/ -Dusemymalloc for
mod_perl DSO
Revision Changes Path
1.26 +37 -20 modperl-docs/src/docs/1.0/guide/install.pod
Index: install.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/install.pod,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -u -r1.25 -r1.26
--- install.pod 18 Mar 2004 20:23:01 -0000 1.25
+++ install.pod 6 Aug 2004 23:34:34 -0000 1.26
@@ -1050,40 +1050,57 @@
without having to mangle the Apache source tree for mod_perl. It also
gives you the freedom to add third-party modules.
-=head2 When DSO can be Used
-If you want to build C<mod_perl> as DSO you must make sure that Perl
-was built with system's native malloc(). If Perl was built with its
-own malloc() and C<-Dbincompat5005>, it pollutes the main C<httpd>
-program with I<free> and I<malloc> symbols. When C<httpd> restarts
-(happens at startup too), any references in the main program to
-I<free> and I<malloc> become invalid, and this causes memory leaks and
-segfaults.
-Notice that mod_perl's build system warns about this problem.
-With Perl 5.6.0+ this pollution can be prevented with
-C<-Ubincompat5005>. or C<-Uusemymalloc> for any version of Perl, but
-there's a chance that might hurt performance depending on platform, so
-C<-Ubincompat5005> is likely a better choice.
-If you get the following reports with Perl version 5.6.0+:
+
+
+=head2 When DSO can be Used
+
+Perl versions prior to 5.6.0, built with C<-Dusemymalloc>, and
+versions 5.6.0 and higher, built with C<-Dusemymalloc> and
+C<-Dbincompat5005>, pollutes the main C<httpd> program with I<free>
+and I<malloc> symbols. When C<httpd> restarts (happens at startup
+too), any references in the main program to I<free> and I<malloc>
+become invalid, and this causes memory leaks and segfaults.
+
+First check which malloc, your Perl was built with, by running:
% perl -V:usemymalloc
+
+If you get:
+
+ usemymalloc='n';
+
+which means that Perl is using the system malloc, mod_perl will work
+fine as DSO. Continue reading this section if it's not the case.
+
+If you get:
+
usemymalloc='y';
+
+that means that Perl is using its own malloc. If you are running Perl
+older than 5.6.0, you must rebuild Perl with C<-Uusemymalloc>. If you
+are running Perl 5.6.0 and higher, you must make sure that you have
+the binary compatibility with Perl 5.005 turned off. To check, run:
+
% perl -V:bincompat5005
+
+If you get:
+
bincompat5005='define';
-rebuild Perl with C<-Ubincompat5005>.
+then you must rebuild Perl with C<-Ubincompat5005>. You can continue
+using Perl's malloc if that's a better choice for your OS.
+
+Notice that mod_perl's build system warns about this problem.
+
+If you needed to rebuild Perl don't forget to rebuild mod_perl too.
-For Perl versions pre-5.6.x, if you get:
- % perl -V:usemymalloc
- usemymalloc='y';
-rebuild Perl with C<-Uusemymalloc>.
-Now rebuild mod_perl.
=head2 Build mod_perl as a DSO inside the Apache Source Tree via APACI
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org