1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-21 09:17:52 +00:00

add extra underscore to heap stuff

This commit is contained in:
mrdudz
2022-08-29 19:55:48 +02:00
parent df4b6f9d14
commit b09024aa32
11 changed files with 105 additions and 89 deletions
+5 -5
View File
@@ -37,11 +37,11 @@ struct freeblock {
/* Variables that describe the heap */
extern unsigned* _heaporg; /* Bottom of heap */
extern unsigned* _heapptr; /* Current top */
extern unsigned* _heapend; /* Upper limit */
extern struct freeblock* _heapfirst; /* First free block in list */
extern struct freeblock* _heaplast; /* Last free block in list */
extern unsigned* __heaporg; /* Bottom of heap */
extern unsigned* __heapptr; /* Current top */
extern unsigned* __heapend; /* Upper limit */
extern struct freeblock* __heapfirst; /* First free block in list */
extern struct freeblock* __heaplast; /* Last free block in list */
+20 -4
View File
@@ -92,17 +92,33 @@ int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size);
*/
#endif
void __fastcall__ _heapadd (void* mem, size_t size);
void __fastcall__ __heapadd (void* mem, size_t size);
/* Add a block to the heap */
#if __CC65_STD__ == __CC65_STD_CC65__
/* define old name with one underscore for backwards compatibility */
#define _heapadd __heapadd
#endif
size_t __fastcall__ _heapblocksize (const void* block);
size_t __fastcall__ __heapblocksize (const void* block);
/* Return the size of an allocated block */
#if __CC65_STD__ == __CC65_STD_CC65__
/* define old name with one underscore for backwards compatibility */
#define _heapblocksize __heapblocksize
#endif
size_t _heapmemavail (void);
size_t __heapmemavail (void);
/* Return the total free heap space */
#if __CC65_STD__ == __CC65_STD_CC65__
/* define old name with one underscore for backwards compatibility */
#define _heapmemavail __heapmemavail
#endif
size_t _heapmaxavail (void);
size_t __heapmaxavail (void);
/* Return the size of the largest free block on the heap */
#if __CC65_STD__ == __CC65_STD_CC65__
/* define old name with one underscore for backwards compatibility */
#define _heapmaxavail __heapmaxavail
#endif
/* Random numbers */