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
refactor: vmm_set_map has option to ignore existed mapping.
[lunaix-os.git]
/
lunaix-os
/
kernel
/
mm
/
dmm.c
diff --git
a/lunaix-os/kernel/mm/dmm.c
b/lunaix-os/kernel/mm/dmm.c
index cb87202e82c33c18a373dcffb5f7def06bbca515..44f0f9e897d2d176a65c260f38744fb3aa3a4c6a 100644
(file)
--- a/
lunaix-os/kernel/mm/dmm.c
+++ b/
lunaix-os/kernel/mm/dmm.c
@@
-57,8
+57,8
@@
dmm_init(heap_context_t* heap)
perm = 0;
}
perm = 0;
}
- return vmm_set_mapping(
PD_REFERENCED, heap->brk, 0, PG_WRITE | perm) !=
- NULL;
+ return vmm_set_mapping(
+
PD_REFERENCED, heap->brk, 0, PG_WRITE | perm, VMAP_NULL) !=
NULL;
}
int
}
int
@@
-93,7
+93,8
@@
lxsbrk(heap_context_t* heap, size_t size, int user)
vmm_set_mapping(PD_REFERENCED,
PG_ALIGN(current_brk) + PG_SIZE + i,
0,
vmm_set_mapping(PD_REFERENCED,
PG_ALIGN(current_brk) + PG_SIZE + i,
0,
- PG_WRITE | user);
+ PG_WRITE | user,
+ VMAP_NULL);
}
}
}
}