1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Removed vm_allocate(), vm_deallocate(), and vm_protect() functions. The

only function remaining in this file is vm_allocate_with_pager(), and this
will be going RSN. The file will be removed when this happens.
This commit is contained in:
David Greenman 1995-02-20 23:58:10 +00:00
parent 91ee94544a
commit ffeec4aefe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6582
2 changed files with 2 additions and 75 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_extern.h 8.2 (Berkeley) 1/12/94
* $Id: vm_extern.h,v 1.9 1995/02/09 14:16:07 davidg Exp $
* $Id: vm_extern.h,v 1.10 1995/02/20 18:08:17 davidg Exp $
*/
#ifndef _VM_EXTERN_H_
@ -104,9 +104,7 @@ void thread_block __P((char *));
void thread_sleep __P((int, simple_lock_t, boolean_t));
void thread_wakeup __P((int));
int useracc __P((caddr_t, int, int));
int vm_allocate __P((vm_map_t, vm_offset_t *, vm_size_t, boolean_t));
int vm_allocate_with_pager __P((vm_map_t, vm_offset_t *, vm_size_t, boolean_t, vm_pager_t, vm_offset_t, boolean_t));
int vm_deallocate __P((vm_map_t, vm_offset_t, vm_size_t));
int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
void vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
void vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
@ -116,7 +114,6 @@ void vm_init_limits __P((struct proc *));
void vm_mem_init __P((void));
int vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, caddr_t, vm_offset_t));
vm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
int vm_protect __P((vm_map_t, vm_offset_t, vm_size_t, boolean_t, vm_prot_t));
void vm_set_page_size __P((void));
void vmmeter __P((void));
struct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int));

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_user.c,v 1.7 1995/02/09 14:14:13 davidg Exp $
* $Id: vm_user.c,v 1.8 1995/02/20 18:08:18 davidg Exp $
*/
/*
@ -76,75 +76,6 @@
simple_lock_data_t vm_alloc_lock; /* XXX */
/*
* vm_protect sets the protection of the specified range in the
* specified map.
*/
int
vm_protect(map, start, size, set_maximum, new_protection)
register vm_map_t map;
vm_offset_t start;
vm_size_t size;
boolean_t set_maximum;
vm_prot_t new_protection;
{
if (map == NULL)
return (KERN_INVALID_ARGUMENT);
return (vm_map_protect(map, trunc_page(start), round_page(start + size), new_protection, set_maximum));
}
/*
* vm_allocate allocates "zero fill" memory in the specfied
* map.
*/
int
vm_allocate(map, addr, size, anywhere)
register vm_map_t map;
register vm_offset_t *addr;
register vm_size_t size;
boolean_t anywhere;
{
int result;
if (map == NULL)
return (KERN_INVALID_ARGUMENT);
if (size == 0) {
*addr = 0;
return (KERN_SUCCESS);
}
if (anywhere)
*addr = vm_map_min(map);
else
*addr = trunc_page(*addr);
size = round_page(size);
result = vm_map_find(map, NULL, (vm_offset_t) 0, addr, size, anywhere);
return (result);
}
/*
* vm_deallocate deallocates the specified range of addresses in the
* specified address map.
*/
int
vm_deallocate(map, start, size)
register vm_map_t map;
vm_offset_t start;
vm_size_t size;
{
if (map == NULL)
return (KERN_INVALID_ARGUMENT);
if (size == (vm_offset_t) 0)
return (KERN_SUCCESS);
return (vm_map_remove(map, trunc_page(start), round_page(start + size)));
}
#if 1
/*
* Similar to vm_allocate but assigns an explicit pager.
*/
@ -197,4 +128,3 @@ vm_allocate_with_pager(map, addr, size, anywhere, pager, poffset, internal)
vm_object_setpager(object, pager, (vm_offset_t) 0, TRUE);
return (result);
}
#endif