- Changed mem_malloc(): near fit behaves like exact fit since mem->next is always used

- Included some more alignment statements
- Every malloced block is at least MIN_SIZE big (can be overridden, can be used to work against fragmentation)
- Added many comments so that the next developer knows what I was thinking :-)
This commit is contained in:
goldsimon
2007-05-11 19:42:10 +00:00
parent 9cf1390dc6
commit 6f4056cf99
2 changed files with 135 additions and 95 deletions

View File

@@ -39,6 +39,9 @@
extern "C" {
#endif
/* MEM_SIZE would have to be aligned, but using 64000 here instead of
* 65535 leaves some room for alignment...
*/
#if MEM_SIZE > 64000l
typedef u32_t mem_size_t;
#define MEM_SIZE_F U32_F