diff options
Diffstat (limited to 'common/tlsf_malloc.c')
-rw-r--r-- | common/tlsf_malloc.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/common/tlsf_malloc.c b/common/tlsf_malloc.c index c8900fc6bb..981f09de41 100644 --- a/common/tlsf_malloc.c +++ b/common/tlsf_malloc.c @@ -1,20 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * tlsf wrapper for barebox * * Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com> - * - * This file is part of barebox. - * See file CREDITS for list of people who contributed to this project. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <malloc.h> @@ -24,7 +12,7 @@ #include <module.h> #include <tlsf.h> -extern tlsf_pool tlsf_mem_pool; +extern tlsf_t tlsf_mem_pool; void *malloc(size_t bytes) { @@ -92,7 +80,7 @@ void malloc_stats(void) s.used = 0; s.free = 0; - tlsf_walk_heap(tlsf_mem_pool, malloc_walker, &s); + tlsf_walk_pool(tlsf_get_pool(tlsf_mem_pool), malloc_walker, &s); printf("used: %zu\nfree: %zu\n", s.used, s.free); } |