memprof 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ext/memprof.c +8 -3
  2. data/ext/util.h +0 -1
  3. data/memprof.gemspec +1 -1
  4. metadata +2 -2
data/ext/memprof.c CHANGED
@@ -35,8 +35,15 @@ static st_table *objs = NULL;
35
35
  /*
36
36
  * stuff needed for heap dumping
37
37
  */
38
+ static double
39
+ rb_timeofday()
40
+ {
41
+ struct timeval tv;
42
+ gettimeofday(&tv, NULL);
43
+ return (double)tv.tv_sec + (double)tv.tv_usec * 1e-6;
44
+ }
45
+
38
46
  static VALUE (*rb_classname)(VALUE);
39
- static double (*rb_timeofday)();
40
47
  static RUBY_DATA_FUNC *rb_bm_mark;
41
48
  static RUBY_DATA_FUNC *rb_blk_free;
42
49
  static RUBY_DATA_FUNC *rb_thread_mark;
@@ -1619,7 +1626,6 @@ init_memprof_config_extended() {
1619
1626
  }
1620
1627
 
1621
1628
  memprof_config.classname = bin_find_symbol("classname", NULL, 0);
1622
- memprof_config.timeofday = bin_find_symbol("timeofday", NULL, 0);
1623
1629
  memprof_config.bm_mark = bin_find_symbol("bm_mark", NULL, 0);
1624
1630
  memprof_config.blk_free = bin_find_symbol("blk_free", NULL, 0);
1625
1631
  memprof_config.thread_mark = bin_find_symbol("thread_mark", NULL, 0);
@@ -1833,7 +1839,6 @@ Init_memprof()
1833
1839
 
1834
1840
  rb_classname = memprof_config.classname;
1835
1841
  rb_add_freelist = memprof_config.add_freelist;
1836
- rb_timeofday = memprof_config.timeofday;
1837
1842
  rb_bm_mark = memprof_config.bm_mark;
1838
1843
  rb_blk_free = memprof_config.blk_free;
1839
1844
  rb_thread_mark = memprof_config.thread_mark;
data/ext/util.h CHANGED
@@ -27,7 +27,6 @@ struct memprof_config {
27
27
  void *freelist;
28
28
  void *classname;
29
29
  void *add_freelist;
30
- void *timeofday;
31
30
 
32
31
  void *rb_mark_table_add_filename;
33
32
 
data/memprof.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'memprof'
3
- s.version = '0.3.1'
3
+ s.version = '0.3.2'
4
4
  s.date = '2010-04-13'
5
5
  s.summary = 'Ruby Memory Profiler'
6
6
  s.description = "Ruby memory profiler similar to bleak_house, but without patches to the Ruby VM"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Joe Damato