#include <config.h>
#include <crxstd.h>
+#include <unistd.h>
#include <corax/errno.h>
+#include <corax/heap.h>
extern int wait(int*);
+extern void heap_init(void*, u32_t);
+
+static inline void _init_heap(void)
+{
+ u32_t init_size;
+ u32_t base, end;
+
+ init_size = 0x1000;
+ end = (unsigned)sbrk(init_size);
+ base = end - 0x1000;
+
+ heap_init((void*)base, init_size);
+
+ return;
+}
void _net(void)
{
struct cxmsg msg;
int len;
+ /* initialize the heap */
+ _init_heap();
+
while(1) {
len = cxrecv(PID_ANY, &msg);