Loading...
Searching...
No Matches
tlsf-malloc.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014-2018 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
36#ifndef TLSF_MALLOC_H
37#define TLSF_MALLOC_H
38
39#include <stddef.h>
40
41#include "tlsf.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
51typedef struct {
52 unsigned free;
53 unsigned used;
55
67void tlsf_size_walker(void* ptr, size_t size, int used, void* user);
68
83int tlsf_add_global_pool(void *mem, size_t bytes);
84
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* TLSF_MALLOC_H */
97
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:51
unsigned free
total free size
Definition tlsf-malloc.h:52
unsigned used
total used size
Definition tlsf-malloc.h:53