GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_block_alloc.h
Go to the documentation of this file.
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2014-2020 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
21#ifndef GP_BLOCK_ALLOC_H
22#define GP_BLOCK_ALLOC_H
23
24#include <stddef.h>
25#include <core/gp_compiler.h>
26
27typedef struct gp_balloc_pool gp_balloc_pool;
28
40GP_WUR void *gp_balloc(gp_balloc_pool **self, size_t size);
41
47void gp_bfree(gp_balloc_pool **self);
48
49#endif /* GP_BLOCK_ALLOC_H */
void * gp_balloc(gp_balloc_pool **self, size_t size)
Allocate memory from a block pool.
void gp_bfree(gp_balloc_pool **self)
Free all blocks in the allocator.
A compiler dependent macros.
#define GP_WUR
Expands to warn_unused_result attribute when supported by the compiler.
Definition gp_compiler.h:26