Tweaked dynamic memory manager to reserve fixed memory block to fractal sound driver
#include "string.h"
#include "kdebug.h"
#include "tools.h"
-
+#include "ext/fractal/fractal.h"
#define USED 1
@@ -167,6 +167,13 @@ void MEM_init()
// define available memory (sizeof(u16) is the memory reserved to indicate heap end)
len = MEMORY_HIGH - (h + sizeof(u16));
+#if (MODULE_FRACTAL != 0)
+ // reserve fixed block of memory for fratal sound driver in high memory area
+ len -= sizeof(Fractal_Data);
+ // align on word
+ len &= 0xFFFE;
+#endif
+
// define heap
heap = (u16*) h;
// and its size
