|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
35 #ifndef __JO_MALLOC_H__
36 # define __JO_MALLOC_H__
42 #define JO_MALLOC_MAX_MEMORY_ZONE (9)
113 #ifdef JO_COMPILE_WITH_RAM_CARD_SUPPORT
void jo_reduce_memory_fragmentation(void)
Reduce memory fragmentation for faster memory allocation.
@ JO_MALLOC_TRY_REUSE_BLOCK
A little bit slower but reduce memory fragmentation.
Definition: malloc.h:75
@ CART_8MBits
1 Mb cartridge
Definition: malloc.h:50
@ JO_FAST_ALLOCATION
Default behaviour.
Definition: malloc.h:73
jo_malloc_behaviour
Malloc behaviour JO_MALLOC_TRY_REUSE_SAME_BLOCK_SIZE | ^ | | Speed efficiency | | V | JO_MALLOC_TRY_R...
Definition: malloc.h:71
jo_extended_ram_cartridge_type
Extended RAM cartridge type.
Definition: malloc.h:46
static __jo_force_inline void * jo_malloc(unsigned int n)
dynamic memory allocator
Definition: malloc.h:91
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
void jo_add_memory_zone(unsigned char *ptr, const unsigned int size_in_bytes)
Register a memory segment for jo_malloc() usage.
void * jo_malloc_with_behaviour(unsigned int n, const jo_malloc_behaviour behaviour)
dynamic memory allocator with specific behaviour
int jo_memory_usage_percent(void)
Get memory usage percent.
void jo_free(const void *const p)
function frees the memory space pointed to by p
@ JO_MALLOC_TRY_REUSE_SAME_BLOCK_SIZE
A little bit slower than JO_MALLOC_TRY_REUSE_BLOCK but reduce memory usage.
Definition: malloc.h:77
@ CART_NONE
No cartridge.
Definition: malloc.h:48
int jo_memory_fragmentation(void)
Get memory fragmentation (Number of fragment in memory)
@ CART_32MBits
4 Mb cartridge
Definition: malloc.h:52