allocation_tracer 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/allocation_tracer/allocation_tracer.c +10 -7
- data/lib/allocation_tracer/version.rb +1 -1
- data/lib/allocation_tracer.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89fd66efaa24f2319186b9499095bad976c68bfe
|
4
|
+
data.tar.gz: dff3b6ab0c8ba0a3db0a1140285dcdd9e06c569c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a014504c663e8ff614ebeec62c49c2dcfb1cf30be1c3009cfa9da0c2d1f7a44ca8789db5919f1aeb6b337719fe0a6f614756749ac8c5aec0c91a766bb33085
|
7
|
+
data.tar.gz: 96fcd0458afc5d052843b269693c9f1fbffaa2df341abca68b11fd8e28bab04464cb0202b85629c61d3f22ed93ade287c656f06c43ac6b3da8204553b89177fe
|
@@ -200,7 +200,7 @@ clear_traceobj_arg(void)
|
|
200
200
|
st_clear(arg->object_table);
|
201
201
|
st_foreach(arg->str_table, free_keys_i, 0);
|
202
202
|
st_clear(arg->str_table);
|
203
|
-
arg->freed_allocation_info =
|
203
|
+
arg->freed_allocation_info = NULL;
|
204
204
|
delete_lifetime_table(arg);
|
205
205
|
}
|
206
206
|
|
@@ -331,10 +331,15 @@ aggregate_freed_info(void *data)
|
|
331
331
|
}
|
332
332
|
|
333
333
|
static void
|
334
|
-
move_to_freed_list(struct traceobj_arg *arg, struct allocation_info *info)
|
334
|
+
move_to_freed_list(struct traceobj_arg *arg, VALUE obj, struct allocation_info *info)
|
335
335
|
{
|
336
|
+
if (arg->freed_allocation_info == NULL) {
|
337
|
+
rb_postponed_job_register_one(0, aggregate_freed_info, arg);
|
338
|
+
}
|
339
|
+
|
336
340
|
info->next = arg->freed_allocation_info;
|
337
341
|
arg->freed_allocation_info = info;
|
342
|
+
st_delete(arg->object_table, (st_data_t *)&obj, (st_data_t *)&info);
|
338
343
|
}
|
339
344
|
|
340
345
|
static void
|
@@ -380,13 +385,11 @@ freeobj_i(VALUE tpval, void *data)
|
|
380
385
|
struct allocation_info *info;
|
381
386
|
|
382
387
|
if (st_lookup(arg->object_table, (st_data_t)obj, (st_data_t *)&info)) {
|
388
|
+
|
383
389
|
info->flags = RBASIC(obj)->flags;
|
384
390
|
info->memsize = rb_obj_memsize_of(obj);
|
385
|
-
|
386
|
-
|
387
|
-
if (arg->freed_allocation_info == NULL) {
|
388
|
-
rb_postponed_job_register_one(0, aggregate_freed_info, arg);
|
389
|
-
}
|
391
|
+
|
392
|
+
move_to_freed_list(arg, obj, info);
|
390
393
|
|
391
394
|
if (arg->lifetime_table) {
|
392
395
|
add_lifetime_table(arg->lifetime_table, BUILTIN_TYPE(obj), info);
|
data/lib/allocation_tracer.rb
CHANGED