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
A Total Overhaul on the Lunaix's Virtual Memory Model (#26)
[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 9503260ac26dc0522b2d9748e31b205a59647a27..9707d52c01d7a0fc75a956c01c1097853c90a6e2 100644
(file)
--- a/
lunaix-os/kernel/mm/cake.c
+++ b/
lunaix-os/kernel/mm/cake.c
@@
-32,7
+32,7
@@
__alloc_cake(unsigned int cake_pg)
if (!pa) {
return NULL;
}
if (!pa) {
return NULL;
}
- return
vmap(pa, cake_pg * PG_SIZE, PG_PREM_RW, 0
);
+ return
(void*)vmap(pa, cake_pg * PAGE_SIZE, KERNEL_DATA
);
}
struct cake_s*
}
struct cake_s*
@@
-86,7
+86,7
@@
__init_pile(struct cake_pile* pile,
*pile = (struct cake_pile){ .piece_size = piece_size,
.cakes_count = 0,
.pieces_per_cake =
*pile = (struct cake_pile){ .piece_size = piece_size,
.cakes_count = 0,
.pieces_per_cake =
- (pg_per_cake * P
G
_SIZE) /
+ (pg_per_cake * P
AGE
_SIZE) /
(piece_size + sizeof(piece_index_t)),
.pg_per_cake = pg_per_cake };
(piece_size + sizeof(piece_index_t)),
.pg_per_cake = pg_per_cake };