-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use OpenBSD's malloc by default #13888
Comments
From afresh1@openbsd.orgCreated by afresh1@openbsd.orgOpenBSD would prefer that perl default to using the system malloc. In perlbug #75742 it was successfully argued that the speed of perl's malloc OpenBSD users, by virtue of having chosen OpenBSD, have made the decision that This has always been the default in the base system perl in OpenBSD. Perl users who do need the additional speed can still build with mymalloc. These speed tests are with perl-5.18.2 as that is what I had easily available. The speed of the OpenBSD malloc is not significantly slower in most cases OpenBSD malloc: perl malloc: This uses a modified version of a malloc speed test I found on the Internet. https://groups.google.com/forum/#!msg/comp.lang.perl.misc/t8kTP_IACfI/4w02x-dWPB4J use strict; use Benchmark qw( timethese :hireswallclock ); my $c1E1 = '#' x 1E1; my $str1 = '#' x 1E5; my $str4 = '#' x 1E7; my $str9 = '#' x 2E7; my @ar1 = map{ $c1E2 } 1..1E5; timethese( 1000, { Perl Info
|
From afresh1@openbsd.org0001-Default-to-using-OpenBSD-s-malloc.patchFrom de5afa1c9bfe274e36e94aec99e866ba8d2c0a15 Mon Sep 17 00:00:00 2001
From: Andrew Fresh <andrew@afresh1.com>
Date: Sat, 31 May 2014 10:30:40 -0700
Subject: [PATCH] Default to using OpenBSD's malloc
While perl bug #75742 successfully convinced p5p that the speed of the
OpenBSD malloc was a good enough reason to instead use perl's malloc,
the system malloc has many security features that OpenBSD users expect.
The system malloc has always been used in the base system perl.
While the is slower than the perl malloc, the OpenBSD project believes
the tradeoff is worth it and would prefer that users who need the speed
specifically ask for it.
---
hints/openbsd.sh | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hints/openbsd.sh b/hints/openbsd.sh
index fd29c71..26a8fe6 100644
--- a/hints/openbsd.sh
+++ b/hints/openbsd.sh
@@ -8,12 +8,8 @@
# ./Configure -des -Dopenbsd_distribution=defined
#
-# In OpenBSD > 3.7, use perl's malloc [perl #75742]
-case "$osvers" in
-3.[89]*|[4-9]*)
- test "$usemymalloc" || usemymalloc=y
- ;;
-esac
+# OpenBSD has a better malloc than perl...
+test "$usemymalloc" || usemymalloc='n'
# malloc wrap works
case "$usemallocwrap" in
--
1.9.2
|
From eric@lalonde.com
I would like to +1 this sentiment. Since the user has installed OpenBSD, the sane default assumption is that the user desires to experience the full breadth of security features built into the OS. |
From [Unknown Contact. See original ticket]
I would like to +1 this sentiment. Since the user has installed OpenBSD, the sane default assumption is that the user desires to experience the full breadth of security features built into the OS. |
From @rurbanOn Sat May 31 15:03:26 2014, eric@lalonde.com wrote:
perl mymalloc is not thread-safe. I wouldn't trust it. I found it odd that openbsd still has to use mymalloc. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @b2gillsOn Sun, Jun 1, 2014 at 1:04 AM, Reini Urban via RT
I would also like to see this happen, as it would likely tease out |
@tonycoz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#122000 (status was 'resolved')
Searchable as RT122000$
The text was updated successfully, but these errors were encountered: