Loading...
Searching...
No Matches
tlsf-malloc.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014-2018 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
35
36#include <stddef.h>
37
38#include "tlsf.h"
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
48typedef struct {
49 unsigned free;
50 unsigned used;
52
64void tlsf_size_walker(void* ptr, size_t size, int used, void* user);
65
80int tlsf_add_global_pool(void *mem, size_t bytes);
81
88
89#ifdef __cplusplus
90}
91#endif
92
int tlsf_add_global_pool(void *mem, size_t bytes)
Add an area of memory to the global allocator pool.
tlsf_t _tlsf_get_global_control(void)
Get a pointer to the global tlsf_control block.
void tlsf_size_walker(void *ptr, size_t size, int used, void *user)
Walk the memory pool to print all block sizes and to calculate the total amount of free and used bloc...
Struct to hold the total sizes of free and used blocks Used for tlsf_size_walker()
Definition tlsf-malloc.h:48
unsigned free
total free size
Definition tlsf-malloc.h:49
unsigned used
total used size
Definition tlsf-malloc.h:50