Example #1
0
void
gum_sanity_checker_destroy (GumSanityChecker * checker)
{
  GumSanityCheckerPrivate * priv = checker->priv;

  if (priv->bounds_checker != NULL)
  {
    g_object_unref (priv->bounds_checker);
    priv->bounds_checker = NULL;
  }

  if (priv->instance_tracker != NULL)
  {
    g_object_unref (priv->instance_tracker);
    priv->instance_tracker = NULL;
  }

  if (priv->alloc_probe != NULL)
  {
    g_object_unref (priv->alloc_probe);
    priv->alloc_probe = NULL;

    g_object_unref (priv->alloc_tracker);
    priv->alloc_tracker = NULL;
  }

  gum_heap_api_list_free (checker->priv->heap_apis);

  gum_free (checker);
}
Example #2
0
void
gum_allocator_probe_attach (GumAllocatorProbe * self)
{
  GumHeapApiList * apis = gum_process_find_heap_apis ();
  gum_allocator_probe_attach_to_apis (self, apis);
  gum_heap_api_list_free (apis);
}
Example #3
0
GumSanityChecker *
gum_sanity_checker_new (GumSanityOutputFunc func,
                        gpointer user_data)
{
  GumHeapApiList * apis;
  GumSanityChecker * checker;

  apis = gum_process_find_heap_apis ();
  checker = gum_sanity_checker_new_with_heap_apis (apis, func, user_data);
  gum_heap_api_list_free (apis);

  return checker;
}