git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git]
/
lunaix-os
/
kernel
/
mm
/
cake.c
diff --git
a/lunaix-os/kernel/mm/cake.c
b/lunaix-os/kernel/mm/cake.c
index e4ceef404121457f67e3cf679f11c81980aac86f..9503260ac26dc0522b2d9748e31b205a59647a27 100644
(file)
--- a/
lunaix-os/kernel/mm/cake.c
+++ b/
lunaix-os/kernel/mm/cake.c
@@
-28,7
+28,7
@@
struct llist_header piles = { .next = &piles, .prev = &piles };
void*
__alloc_cake(unsigned int cake_pg)
{
void*
__alloc_cake(unsigned int cake_pg)
{
- ptr_t pa = (ptr_t)pmm_alloc_cpage(
KERNEL_PID,
cake_pg, 0);
+ ptr_t pa = (ptr_t)pmm_alloc_cpage(cake_pg, 0);
if (!pa) {
return NULL;
}
if (!pa) {
return NULL;
}
@@
-206,6
+206,8
@@
found:
llist_append(&pile->partial, &pos->cakes);
}
llist_append(&pile->partial, &pos->cakes);
}
+ *((unsigned int*)area) = DEADCAKE_MARK;
+
return 1;
}
return 1;
}