diff options
author | dg <dg@FreeBSD.org> | 1995-02-20 22:23:31 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-02-20 22:23:31 +0000 |
commit | 80d6bd62277e274c458ddf671134238fc6c0bf24 (patch) | |
tree | 843bfeb240cb65cf94c99ad6b5ea3b52fcc7f231 /sys/kern/imgact_aout.c | |
parent | d59996f398d56d8eb85aa88910c9fd1a1200ecdc (diff) | |
download | FreeBSD-src-80d6bd62277e274c458ddf671134238fc6c0bf24.zip FreeBSD-src-80d6bd62277e274c458ddf671134238fc6c0bf24.tar.gz |
Use of vm_allocate() and vm_deallocate() has been deprecated.
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r-- | sys/kern/imgact_aout.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 5d6454c..bdce10d 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: imgact_aout.c,v 1.9 1994/09/25 19:33:31 phk Exp $ + * $Id: imgact_aout.c,v 1.10 1995/02/14 19:22:27 sos Exp $ */ #include <sys/param.h> @@ -170,15 +170,17 @@ exec_aout_imgact(iparams) if (error) return (error); - /* - * Allocate demand-zeroed area for uninitialized data - * "bss" = 'block started by symbol' - named after the IBM 7090 - * instruction of the same name. - */ - vmaddr = virtual_offset + a_out->a_text + a_out->a_data; - error = vm_allocate(&vmspace->vm_map, &vmaddr, bss_size, FALSE); - if (error) - return (error); + if (bss_size != 0) { + /* + * Allocate demand-zeroed area for uninitialized data + * "bss" = 'block started by symbol' - named after the IBM 7090 + * instruction of the same name. + */ + vmaddr = virtual_offset + a_out->a_text + a_out->a_data; + error = vm_map_find(&vmspace->vm_map, NULL, 0, &vmaddr, bss_size, FALSE); + if (error) + return (error); + } /* Fill in process VM information */ vmspace->vm_tsize = a_out->a_text >> PAGE_SHIFT; |