aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/wm/main.c2
-rw-r--r--kernel/features/dev.c2
-rw-r--r--kernel/features/mm.c7
-rw-r--r--kernel/inc/mm.h1
4 files changed, 9 insertions, 3 deletions
diff --git a/apps/wm/main.c b/apps/wm/main.c
index d7bef72..f19d03d 100644
--- a/apps/wm/main.c
+++ b/apps/wm/main.c
@@ -389,7 +389,7 @@ static void window_request_destroy(struct window *win)
*/
#define PING_INTERVAL 100
-#define PING_COUNT 3 // -> kill if >=
+#define PING_COUNT 5 // -> kill if >=
static void window_ping(struct window *win)
{
diff --git a/kernel/features/dev.c b/kernel/features/dev.c
index c190a8a..24d00ad 100644
--- a/kernel/features/dev.c
+++ b/kernel/features/dev.c
@@ -114,7 +114,7 @@ res dev_poll(u32 *devs)
}
}
- struct dev_listener *listener = zalloc(sizeof(*listener));
+ struct dev_listener *listener = malloc(sizeof(*listener));
listener->group = group;
listener->proc = proc_current();
list_add(dev_listeners[type], listener);
diff --git a/kernel/features/mm.c b/kernel/features/mm.c
index 736a5a4..64a7523 100644
--- a/kernel/features/mm.c
+++ b/kernel/features/mm.c
@@ -194,7 +194,7 @@ struct memory_range physical_alloc(u32 size)
}
}
- panic("Out of physical memory!\n");
+ panic("Out of physical memory (%d of %d)!\n", memory_used, memory_total);
return memory_range(0, 0);
}
@@ -204,6 +204,11 @@ void physical_free(struct memory_range range)
physical_set_free(range);
}
+void physical_print(void)
+{
+ printf("%d of %d\n", memory_used, memory_total);
+}
+
/**
* Virtual
*/
diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h
index 4f3f537..a7644ad 100644
--- a/kernel/inc/mm.h
+++ b/kernel/inc/mm.h
@@ -28,6 +28,7 @@ void physical_free(struct memory_range range);
void physical_set_used(struct memory_range range);
void physical_set_free(struct memory_range range);
void physical_set_total(u32 total);
+void physical_print(void);
/**
* Virtual