1.\" 2.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd July 19, 2003 27.Dt VM_MAP_SUBMAP 9 28.Os 29.Sh NAME 30.Nm vm_map_submap 31.Nd create a subordinate map 32.Sh SYNOPSIS 33.In sys/param.h 34.In vm/vm.h 35.In vm/vm_map.h 36.Ft int 37.Fo vm_map_submap 38.Fa "vm_map_t map" "vm_offset_t start" "vm_offset_t end" "vm_map_t submap" 39.Fc 40.Sh DESCRIPTION 41The 42.Fn vm_map_submap 43function marks the range bounded by 44.Fa start 45and 46.Fa end 47within the map 48.Fa map 49as being handled by a subordinate map 50.Fa sub_map . 51.Pp 52It is generally called by the kernel memory allocator. 53.Sh IMPLEMENTATION NOTES 54This function is for internal use only. 55.Pp 56Both maps must exist. 57The range must have been created with 58.Xr vm_map_find 9 59previously. 60.Pp 61No other operations may have been performed on this range 62before calling this function. 63Only the 64.Fn vm_fault 65operation may be performed within this range after calling 66this function. 67.Pp 68To remove a submapping, one must first remove the range from 69the parent 70.Fa map , 71and then destroy the 72.Fa sub_map . 73This procedure is not recommended. 74.Sh RETURN VALUES 75The 76.Fn vm_map_submap 77function returns 78.Dv KERN_SUCCESS 79if successful. 80.Pp 81Otherwise, it returns 82.Dv KERN_INVALID_ARGUMENT 83if the caller requested copy-on-write flags, 84or if the range specified for the sub-map was out of range for the parent map, 85or if a 86.Dv NULL 87backing object was specified. 88.Sh SEE ALSO 89.Xr vm_map 9 , 90.Xr vm_map_find 9 91.Sh AUTHORS 92This manual page was written by 93.An Bruce M Simpson Aq Mt bms@spc.org . 94