git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit a175eee0e8487cbc651e0fa0ef38c6af2d71c038
parent 15da22ad72b4781c4df50ba38a713407a298ba08
Author: Toxa <untoxa@mail.ru>
Date:   Thu, 19 Aug 2021 13:16:58 +0300

there is no support for this in the gbdk-2020 library; you may use malloc/free from the stdlib instead

Diffstat:
Dgbdk-lib/include/gb/malloc.h45---------------------------------------------
1 file changed, 0 insertions(+), 45 deletions(-)

diff --git a/gbdk-lib/include/gb/malloc.h b/gbdk-lib/include/gb/malloc.h @@ -1,45 +0,0 @@ -/** @file gb/malloc.h - - Header for a simple implementation of malloc(). - - @todo: This library may currently be broken. -*/ -#ifndef __SYS_MALLOC_H -#define __SYS_MALLOC_H - -#include <types.h> - -/* The various constants */ -/** The malloc hunk flags - Note: Cound have used a negative size a'la TI -*/ -#define MALLOC_FREE 1 -#define MALLOC_USED 2 - -/** Magic number of a header. Gives us some chance of - surviving if the list is corrupted*/ -#define MALLOC_MAGIC 123 - -/* malloc hunk header definition */ -typedef struct smalloc_hunk mmalloc_hunk; -typedef struct smalloc_hunk * pmmalloc_hunk; - -struct smalloc_hunk { - unsigned char magic; /* Magic number - indicates valid hunk header */ - pmmalloc_hunk next; /* Pointer to the next hunk */ - unsigned int size; /* Size in bytes of this region */ - int status; /* One of MALLOC_FREE or MALLOC_USED */ -}; - -/** Start of free memory, as defined by the linker */ -extern uint8_t malloc_heap_start; - -/** First hunk */ -extern pmmalloc_hunk malloc_first; - -/** Garbage collect (join free hunks) */ -void malloc_gc(void) NONBANKED; -/** debug message logger */ -void debug( char *routine, char *msg ) NONBANKED; - -#endif /* __SYS_MALLOC_H */

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.