Creates the segments associated with a range of bytes in a file and attaches them to the kernel's address space.
| Item | Description | 
|---|---|
| basesid | Identifies the base segment. | 
| pfirst | The first page number within the range. The pfirst parameter is non-negative. | 
| flags | Optional flags passed in by the user. . | 
| basepp | The offset of the object to be attached. | 
The vm_segmap kernel service routine creates segments associated with a range of bytes in a file. Afterwards, it uses the vm_att kernel service to map the specified virtual memory object to a region in the virtual address space and returns the effective address of that object in the basepp parameter.
The vm_segmap kernel service can be called from either the process or interrupt environment.
| Item | Description | 
|---|---|
| caddr_t | The effective address of the attached object. | 
| EINVAL | Indicates one of the following errors: 
 | 
| EFBIG | Indicates the range of values is too large to create. |