1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Fix a map entry leak problem found by DG. Also, de-inline a function

vm_map_entry_dispose, because it won't help being inlined.
This commit is contained in:
John Dyson 1996-12-07 06:19:37 +00:00
parent 807cf4006d
commit 62487bb4db
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20187

View File

@ -325,14 +325,15 @@ vm_map_init(map, min, max, pageable)
*
* Inverse of vm_map_entry_create.
*/
static __inline void
static void
vm_map_entry_dispose(map, entry)
vm_map_t map;
vm_map_entry_t entry;
{
int s;
if (kentry_count < KENTRY_LOW_WATER) {
if (map == kernel_map || map == kmem_map ||
map == mb_map || map == pager_map) {
s = splvm();
entry->next = kentry_free;
kentry_free = entry;
@ -394,7 +395,8 @@ vm_map_entry_create(map)
splx(s);
}
if (map == kernel_map || map == kmem_map || map == mb_map || map == pager_map) {
if (map == kernel_map || map == kmem_map ||
map == mb_map || map == pager_map) {
s = splvm();
entry = kentry_free;
if (entry) {