mall 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.document +6 -0
- data/.gitignore +13 -0
- data/.olddoc.yml +4 -0
- data/COPYING +165 -0
- data/GIT-VERSION-GEN +40 -0
- data/GNUmakefile +12 -0
- data/Gemfile +6 -0
- data/LICENSE +18 -0
- data/README +88 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/mall/.gitignore +5 -0
- data/ext/mall/extconf.rb +12 -0
- data/ext/mall/mall.c +301 -0
- data/ext/mall/mall.c.erb +246 -0
- data/mall.gemspec +21 -0
- data/pkg.mk +150 -0
- data/setup.rb +1585 -0
- data/test/test_mall.rb +66 -0
- metadata +76 -0
data/test/test_mall.rb
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require "tempfile"
|
|
2
|
+
require "test/unit"
|
|
3
|
+
require "mall"
|
|
4
|
+
|
|
5
|
+
class TestMall < Test::Unit::TestCase
|
|
6
|
+
|
|
7
|
+
def test_module
|
|
8
|
+
assert_kind_of Module, Mall
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def test_mallinfo
|
|
12
|
+
assert Hash === Mall.info
|
|
13
|
+
Mall.info.each { |key,value|
|
|
14
|
+
assert Symbol === key
|
|
15
|
+
assert Fixnum === value
|
|
16
|
+
}
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def test_mallopt
|
|
20
|
+
Mall.constants.each { |konst|
|
|
21
|
+
rv = Mall.opt(Mall.const_get(konst), 0)
|
|
22
|
+
assert(TrueClass === rv || FalseClass === rv)
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def test_trim
|
|
27
|
+
if Mall.respond_to?(:trim)
|
|
28
|
+
rv = Mall.trim(1024)
|
|
29
|
+
assert(TrueClass === rv || FalseClass === rv)
|
|
30
|
+
else
|
|
31
|
+
warn "Mall.trim not supported"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def test_xml
|
|
36
|
+
if Mall.respond_to?(:xml)
|
|
37
|
+
str = Mall.xml
|
|
38
|
+
assert_match /<malloc version=/, str
|
|
39
|
+
|
|
40
|
+
tmp = []
|
|
41
|
+
assert_equal tmp, Mall.xml(0, tmp)
|
|
42
|
+
assert_match /<malloc version=/, tmp[0]
|
|
43
|
+
assert_equal 1, tmp.size
|
|
44
|
+
else
|
|
45
|
+
warn "Mall.xml not supported"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def test_dump_stats
|
|
50
|
+
if Mall.respond_to?(:dump_stats)
|
|
51
|
+
olderr = $stderr.dup
|
|
52
|
+
begin
|
|
53
|
+
tmp = Tempfile.new('mall_dump_stats')
|
|
54
|
+
$stderr.sync = tmp.sync = true
|
|
55
|
+
$stderr.reopen(tmp)
|
|
56
|
+
assert_nil Mall.dump_stats
|
|
57
|
+
assert tmp.stat.size != 0
|
|
58
|
+
ensure
|
|
59
|
+
$stderr.reopen(olderr)
|
|
60
|
+
end
|
|
61
|
+
else
|
|
62
|
+
warn "Mall.dump_stats not supported"
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: mall
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.3
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- mall hackers (mall@yhbt.net)
|
|
8
|
+
- Ivan Prisyazhnyy
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
|
13
|
+
dependencies: []
|
|
14
|
+
description: |-
|
|
15
|
+
This library provides access to the SysV mallinfo(3) and mallopt(3)
|
|
16
|
+
functions as well as (optionally) several glibc-specific malloc_*()
|
|
17
|
+
functions. Mall.opt, Mall.trim and Mall.xml are the most interesting.
|
|
18
|
+
|
|
19
|
+
1.0.3 fixes minor issues to be compatible with gem install and rake.
|
|
20
|
+
email:
|
|
21
|
+
- john.koepi@gmail.com
|
|
22
|
+
- mall@yhbt.net
|
|
23
|
+
executables: []
|
|
24
|
+
extensions:
|
|
25
|
+
- ext/mall/extconf.rb
|
|
26
|
+
extra_rdoc_files:
|
|
27
|
+
- LICENSE
|
|
28
|
+
- README
|
|
29
|
+
- ext/mall/mall.c
|
|
30
|
+
files:
|
|
31
|
+
- ".document"
|
|
32
|
+
- ".gitignore"
|
|
33
|
+
- ".olddoc.yml"
|
|
34
|
+
- COPYING
|
|
35
|
+
- GIT-VERSION-GEN
|
|
36
|
+
- GNUmakefile
|
|
37
|
+
- Gemfile
|
|
38
|
+
- LICENSE
|
|
39
|
+
- README
|
|
40
|
+
- Rakefile
|
|
41
|
+
- bin/console
|
|
42
|
+
- bin/setup
|
|
43
|
+
- ext/mall/.gitignore
|
|
44
|
+
- ext/mall/extconf.rb
|
|
45
|
+
- ext/mall/mall.c
|
|
46
|
+
- ext/mall/mall.c.erb
|
|
47
|
+
- mall.gemspec
|
|
48
|
+
- pkg.mk
|
|
49
|
+
- setup.rb
|
|
50
|
+
- test/test_mall.rb
|
|
51
|
+
homepage: https://github.com/sitano/mall
|
|
52
|
+
licenses:
|
|
53
|
+
- LGPL
|
|
54
|
+
metadata: {}
|
|
55
|
+
post_install_message:
|
|
56
|
+
rdoc_options: []
|
|
57
|
+
require_paths:
|
|
58
|
+
- ext
|
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
|
+
requirements:
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '0'
|
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
requirements: []
|
|
70
|
+
rubyforge_project:
|
|
71
|
+
rubygems_version: 2.6.14.4
|
|
72
|
+
signing_key:
|
|
73
|
+
specification_version: 4
|
|
74
|
+
summary: access malloc tuning/reporting functions + glibc extras. linux only.
|
|
75
|
+
test_files:
|
|
76
|
+
- test/test_mall.rb
|