diff options
author | alc <alc@FreeBSD.org> | 2004-04-23 03:01:40 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-04-23 03:01:40 +0000 |
commit | c8457a17a5edc36efcd781535b1388be1a70b0a2 (patch) | |
tree | 8d448ba35dc0e540e369306decfd25b051f755b3 /sys/kern/imgact_elf.c | |
parent | 8e27464c81a3751d082bf33a44765cc371479797 (diff) | |
download | FreeBSD-src-c8457a17a5edc36efcd781535b1388be1a70b0a2.zip FreeBSD-src-c8457a17a5edc36efcd781535b1388be1a70b0a2.tar.gz |
Utilize sf_buf_alloc() rather than pmap_qenter() (and sometimes
kmem_alloc_wait()) for mapping the image header. On all machines with a
direct virtual-to-physical mapping and SMP/HTT i386s, this is a clear win.
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r-- | sys/kern/imgact_elf.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 46c2477..e0b27c0 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -528,16 +528,10 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, imgp->userspace_envv = NULL; imgp->attr = attr; imgp->firstpage = NULL; - imgp->image_header = (char *)kmem_alloc_wait(exec_map, PAGE_SIZE); + imgp->image_header = NULL; imgp->object = NULL; imgp->execlabel = NULL; - if (imgp->image_header == NULL) { - nd->ni_vp = NULL; - error = ENOMEM; - goto fail; - } - /* XXXKSE */ NDINIT(nd, LOOKUP, LOCKLEAF|FOLLOW, UIO_SYSSPACE, file, curthread); @@ -626,9 +620,6 @@ __elfN(load_file)(struct proc *p, const char *file, u_long *addr, fail: if (imgp->firstpage) exec_unmap_first_page(imgp); - if (imgp->image_header) - kmem_free_wakeup(exec_map, (vm_offset_t)imgp->image_header, - PAGE_SIZE); if (imgp->object) vm_object_deallocate(imgp->object); |