~aleteoryx/muditaos

ref: c77a104f3d781b7fb93773be5a2b5af6b97b2a8c muditaos/module-os/memory/usermem.h -rw-r--r-- 801 bytes
c77a104f — Maciej Gibowicz [BH-1991] Creating a new application "What`s new" 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 *  @file usermem.h
 *  @author Mateusz Piesta (mateusz.piesta@mudita.com)
 *  @date 30 lip 2018
 *  @brief DYnamic memory allocator for user space
 *  @copyright Copyright (C) 2018 mudita.com
 *  @details
 */

#ifndef USERMEM_H_
#define USERMEM_H_

#include <stdlib.h>

#ifdef __cplusplus
extern "C" {
#endif

void *usermalloc(size_t xWantedSize);

void userfree(void *pv);

size_t usermemGetFreeHeapSize(void);

size_t usermemGetMinimumEverFreeHeapSize(void);

void usermemResetStatistics(void);
size_t usermemGetAllocationsCount(void);
size_t usermemGetDeallocationsCount(void);
size_t usermemGetAllocatedMin(void);
size_t usermemGetAllocatedMax(void);
size_t usermemGetAllocatedSum(void);

void *userrealloc(void *pv, size_t xWantedSize);

#ifdef __cplusplus
}
#endif


#endif /* USERMEM_H_ */