aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/ralloc.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-02-24 02:05:16 +0000
committerKenneth Graunke <[email protected]>2017-02-27 15:46:12 -0800
commit63d1ebca3a6e1ec51f7f31ab9b77af0fb7e7f857 (patch)
treee75a7952f0f028484f342dc40b8dd5b222db573e /src/util/ralloc.c
parentaa8bb9fc157367a12aa83a44b627ddeed02e2711 (diff)
ralloc: Delete autofree handling.
There was exactly one user of this, and I just removed it. It also accessed an implicit global context, with no locking. This meant that it was only safe if all callers of ralloc_autofree_context() held the same lock...which is a pretty terrible thing for a utility library to impose. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/util/ralloc.c')
-rw-r--r--src/util/ralloc.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/util/ralloc.c b/src/util/ralloc.c
index 980e4e4f138..d5cc16766b1 100644
--- a/src/util/ralloc.c
+++ b/src/util/ralloc.c
@@ -323,24 +323,6 @@ ralloc_parent(const void *ptr)
return info->parent ? PTR_FROM_HEADER(info->parent) : NULL;
}
-static void *autofree_context = NULL;
-
-static void
-autofree(void)
-{
- ralloc_free(autofree_context);
-}
-
-void *
-ralloc_autofree_context(void)
-{
- if (unlikely(autofree_context == NULL)) {
- autofree_context = ralloc_context(NULL);
- atexit(autofree);
- }
- return autofree_context;
-}
-
void
ralloc_set_destructor(const void *ptr, void(*destructor)(void *))
{