jemalloc 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -0
- data/Gemfile.lock +1 -1
- data/ext/jemalloc/extconf.rb +24 -7
- data/lib/jemalloc/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
data/Gemfile.lock
CHANGED
data/ext/jemalloc/extconf.rb
CHANGED
@@ -4,21 +4,32 @@ require 'rbconfig'
|
|
4
4
|
$stdout.sync = true
|
5
5
|
pkg = "jemalloc-3.2.0"
|
6
6
|
|
7
|
+
def sys(cmd)
|
8
|
+
puts "$ #{cmd}"
|
9
|
+
unless ret = xsystem(cmd)
|
10
|
+
raise "system command `#{cmd}' failed, please report to https://github.com/ibc/em-udns/issues"
|
11
|
+
end
|
12
|
+
ret
|
13
|
+
end
|
14
|
+
|
7
15
|
# monfigure and copy sources to cur_dir
|
16
|
+
src_dir = File.expand_path(File.dirname(__FILE__))
|
8
17
|
cur_dir = Dir.pwd
|
9
18
|
Dir.chdir File.dirname(__FILE__) do
|
10
19
|
# cleanup
|
11
|
-
|
12
|
-
|
20
|
+
FileUtils.remove_dir(pkg, force = true)
|
21
|
+
|
22
|
+
# decompress and copy source files
|
23
|
+
sys "tar vjxf #{pkg}.tar.bz2"
|
13
24
|
Dir.chdir(pkg) do
|
14
25
|
# configure
|
15
|
-
|
26
|
+
sys "./configure"
|
16
27
|
# zone.c is only for Mac OS X
|
17
28
|
if RbConfig::CONFIG['target_vendor'] != "apple"
|
18
|
-
|
29
|
+
sys "rm -fR src/zone.c"
|
19
30
|
end
|
20
31
|
# mkmf only allows *.c files on current dir
|
21
|
-
|
32
|
+
sys "cp src/*.c #{src_dir}"
|
22
33
|
end
|
23
34
|
end
|
24
35
|
Dir.chdir cur_dir
|
@@ -28,15 +39,21 @@ $CFLAGS << %[ -std=gnu99 -Wall -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
|
|
28
39
|
|
29
40
|
create_makefile('jemalloc')
|
30
41
|
|
31
|
-
#
|
42
|
+
# Modify Makefile to create .dylib, instead of .bundle. Because extconf.rb
|
43
|
+
# generates .bundle by default, but .bundle cannot be dynamically loaded by
|
44
|
+
# LD_PRELOAD.
|
32
45
|
# NOTICE: Mac OS X only
|
33
46
|
if RbConfig::CONFIG['target_vendor'] == "apple"
|
34
47
|
makefile = open('Makefile').read
|
48
|
+
# for 1.9.2 and 1.9.3
|
35
49
|
if makefile =~ /-dynamic\ -bundle/ && makefile =~ /-flat_namespace/
|
36
50
|
makefile.gsub!(/-dynamic\ -bundle/, '-shared')
|
37
51
|
makefile.gsub!(/-flat_namespace/, '-dylib_install_name')
|
52
|
+
# for 2.0.0
|
53
|
+
elsif makefile =~ /-dynamic\ -bundle/
|
54
|
+
makefile.gsub!(/-dynamic\ -bundle/, '-shared')
|
38
55
|
else
|
39
|
-
raise 'Your platform is not supported. Please report to http://github.com/treasure-data/
|
56
|
+
raise 'Your platform is not supported. Please report to http://github.com/treasure-data/jemalloc-rb'
|
40
57
|
end
|
41
58
|
open('Makefile', 'w'){ |f| f.write(makefile) }
|
42
59
|
end
|
data/lib/jemalloc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jemalloc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|