summaryrefslogtreecommitdiffstats
path: root/ta/ta.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-23 14:32:15 +0100
committerwm4 <wm4@nowhere>2020-02-23 14:32:15 +0100
commita9586625d1002fdb800303a464691d85d4da91df (patch)
tree00ee5870ece90f649f4e54dd363ad63dc35642de /ta/ta.c
parent57ecfb4da290a7c6aadefbdfe30b0319c8944e88 (diff)
downloadmpv-a9586625d1002fdb800303a464691d85d4da91df.tar.bz2
mpv-a9586625d1002fdb800303a464691d85d4da91df.tar.xz
ta: remove ta_find_parent()
Some mpv code once needed this, but it was removed in 2015.
Diffstat (limited to 'ta/ta.c')
-rw-r--r--ta/ta.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/ta/ta.c b/ta/ta.c
index 817ccfd3ab..fffc1a6602 100644
--- a/ta/ta.c
+++ b/ta/ta.c
@@ -291,22 +291,6 @@ bool ta_set_destructor(void *ptr, void (*destructor)(void *))
return true;
}
-/* Return the ptr's parent allocation, or NULL if there isn't any.
- *
- * Warning: this has O(N) runtime complexity with N sibling allocations!
- */
-void *ta_find_parent(void *ptr)
-{
- struct ta_header *h = get_header(ptr);
- if (!h || !h->next)
- return NULL;
- for (struct ta_header *cur = h->next; cur != h; cur = cur->next) {
- if (cur->size == CHILDREN_SENTINEL)
- return PTR_FROM_HEADER(cur->ext->header);
- }
- return NULL;
-}
-
#ifdef TA_MEMORY_DEBUGGING
#include <pthread.h>