2020-11-04 22:12:01 +01:00
|
|
|
//---
|
|
|
|
// config - Compile-time generate configuration
|
|
|
|
//---
|
|
|
|
|
|
|
|
#ifndef GINT_CONFIG
|
|
|
|
#define GINT_CONFIG
|
|
|
|
|
|
|
|
#include <gint/defs/types.h>
|
|
|
|
|
|
|
|
/* GINT_VERSION: Latest tag and number of additional commits
|
|
|
|
"2.1.0" = Release 2.1.0
|
|
|
|
"2.1.1-5" = 5 commits after release 2.1.1 */
|
2021-01-25 15:31:20 +01:00
|
|
|
#define GINT_VERSION "@GINT_GIT_VERSION@"
|
2020-11-04 22:12:01 +01:00
|
|
|
|
|
|
|
/* GINT_HASH: Commit hash with 7 digits
|
|
|
|
0x03f7c0a0 = Commit 3f7c0a0 */
|
2021-01-25 15:31:20 +01:00
|
|
|
#define GINT_HASH 0x@GINT_GIT_HASH@
|
2020-11-04 22:12:01 +01:00
|
|
|
|
2021-01-25 19:06:42 +01:00
|
|
|
/* GINT_USER_VRAM: Selects whether to store VRAMs in the user stack (occupying
|
|
|
|
350k/512k of the area) or in the system stack (the default). (fx-CG 50) */
|
|
|
|
#cmakedefine GINT_USER_VRAM
|
|
|
|
|
|
|
|
/* GINT_STATIC_GRAY: Selects whether additional gray VRAMs are allocated
|
|
|
|
statically or in the system heap (fx-9860G) */
|
|
|
|
#cmakedefine GINT_STATIC_GRAY
|
|
|
|
|
kmalloc: implement a custom segregated list allocator
The new allocator uses a segregated best-fit algorithm with exact-size
lists for all sizes between 8 bytes (the minimum) and 60 bytes, one list
for blocks of size 64-252 and one for larger blocks.
Arenas managed by this allocator have built-in statistics that track
used and free memory (accounting for block headers), peak memory, and
various allocation results.
In addition, the allocator has self-checks in the form of integrity
verifications, that can be enabled with -DGINT_KMALLOC_DEBUG=1 at
configuration time or with the :dev configuration for GiteaPC. This is
used by gintctl.
The kmalloc interface is extended with a new arena covering all unused
memory in user RAM, managed by gint's allocator. It spans about 4 kB on
SH3 fx-9860G, 16 kB on SH4 fx-9860G, and 500 kB on fx-CG 50, in addition
to the OS heap. This new arena is now the default arena for malloc(),
except on SH3 where some heap problems are currently known.
2021-03-15 15:04:24 +01:00
|
|
|
/* GINT_KMALLOC_DEBUG: Selects whether kmalloc debug functions are enabled
|
|
|
|
(these are mainly data structure integrity checks and information that make
|
|
|
|
sense for a developer). This is independent from statistics, which can be
|
|
|
|
enabled or disabled at runtime. */
|
|
|
|
#cmakedefine GINT_KMALLOC_DEBUG
|
|
|
|
|
2020-11-04 22:12:01 +01:00
|
|
|
#endif /* GINT_CONFIG */
|