Helium
memory.h
Go to the documentation of this file.
1 /* *
2  * Lightway Core
3  * Copyright (C) 2021 Express VPN International Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
26 #ifndef MEMORY_H
27 #define MEMORY_H
28 
29 #include "he.h"
30 
41 he_return_code_t he_set_allocators(he_malloc_t malloc, he_calloc_t calloc, he_realloc_t realloc,
42  he_free_t free);
43 
44 void *he_internal_malloc(size_t size);
45 void *he_internal_calloc(size_t nmemb, size_t size);
46 void *he_internal_realloc(void *ptr, size_t size);
47 void he_internal_free(void *ptr);
48 
49 #endif // MEMORY_H
enum he_return_code he_return_code_t
All possible return codes for helium.
he_return_code_t he_set_allocators(he_malloc_t malloc, he_calloc_t calloc, he_realloc_t realloc, he_free_t free)
Set allocators for use by libhelium.
Definition: memory.c:27
Core internal header file for libhelium.