Vasfed / heap_dump

ruby gem for dumping heap references
MIT License
91 stars 13 forks source link

Expose count_objects to gdb interface? #5

Closed mrb closed 11 years ago

mrb commented 11 years ago

I think it's useful to have a convenient means to ge the count_objects JSON from the gdb interface as well - what do you think?

Vasfed commented 11 years ago

@mrb, Agree, just to keep interfaces consistent. Actually i doubt it would be that useful, but will add.

mrb commented 11 years ago

@Vasfed I can think of a good use case but I'm curious why you don't think it will be that useful

Vasfed commented 11 years ago

@mrb done, use call (void)heapdump_count_objects_print("Object", "YourNamespace", "") - this will print to stderr, no additional memory allocation, or call (char*)heapdump_count_objects_return("Object", "") - this allocates memory, so use call (void)free($$) (or where pointer was stored)

mrb commented 11 years ago

@Vasfed Awesome. Thanks.