Changed the way, used blocks are managed
git-svn-id: svn://svn.cc65.org/cc65/trunk@3340 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* _heap.h
|
||||
*
|
||||
* Ullrich von Bassewitz, 03.06.1998
|
||||
* Ullrich von Bassewitz, 1998-06-03, 2004-12-19
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -12,12 +12,22 @@
|
||||
|
||||
|
||||
|
||||
/* Structure that preceeds a user block in most cases.
|
||||
* The aligned_malloc function may generate blocks where the start pointer
|
||||
* and size are splitted to handle a memory hole that is needed for
|
||||
* alignment.
|
||||
*/
|
||||
struct usedblock {
|
||||
unsigned size;
|
||||
struct usedblock* start;
|
||||
};
|
||||
|
||||
/* Space needed for administering used blocks */
|
||||
#define HEAP_ADMIN_SPACE sizeof (unsigned)
|
||||
#define HEAP_ADMIN_SPACE sizeof (struct usedblock)
|
||||
|
||||
/* The data type used to implement the free list.
|
||||
* Beware: Field order is significant!
|
||||
*/
|
||||
*/
|
||||
struct freeblock {
|
||||
unsigned size;
|
||||
struct freeblock* next;
|
||||
|
||||
Reference in New Issue
Block a user