stumpless 2.2.0
载入中...
搜索中...
未找到
memory.h
浏览该文件的文档.
1/* SPDX-License-Identifier: Apache-2.0 */
2
3/*
4 * Copyright 2018-2024 Joel E. Anderson
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
30#ifndef __STUMPLESS_MEMORY_H
31# define __STUMPLESS_MEMORY_H
32
33# include <stddef.h>
34# include <stumpless/config.h>
35
36# ifdef __cplusplus
37extern "C" {
38# endif
39
69void
71
94void
96
122void *
123( *stumpless_set_malloc( void * ( *malloc_func )( size_t ) ) )
124( size_t );
125
154void
155( *stumpless_set_free( void ( *free_func )( void *) ) )
156( void * );
157
183void *
184( *stumpless_set_realloc( void * ( *realloc_func ) ( void *, size_t) ) )
185( void *, size_t );
186
187# ifdef __cplusplus
188} /* extern "C" */
189# endif
190
191#endif /* __STUMPLESS_MEMORY_H */
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
定义 config.h:31
void *(*)(size_t) stumpless_set_malloc(void *(*malloc_func)(size_t))
Sets the function used by the library to allocate memory.
定义 memory.h:123
void stumpless_free_thread(void)
Frees all memory allocated internally to the calling thread, and performs any other thread-specific c...
void stumpless_free_all(void)
Closes the default target if it has been opened, frees all memory allocated internally,...
void(*)(void *) stumpless_set_free(void(*free_func)(void *))
Sets the function used by the library to free memory.
定义 memory.h:155
void *(*)(void *, size_t) stumpless_set_realloc(void *(*realloc_func)(void *, size_t))
Sets the function used by the library to reallocate memory.
定义 memory.h:184