[Overview][Constants][Types][Procedures and functions][Variables][Index] | Reference for unit 'go32' (#rtl)

# get_linear_addr

Convert physical to linear address

## Declaration

Source position: go32.pp line 97

`function get_linear_addr(`
`phys_addr: DWord;`
`size: LongInt`
`):DWord;`

## Description

Converts a physical address into a linear address.

Parameters:

phys_addr
  physical address of device.
size
  Size of region to map in bytes.

Return value: Linear address that can be used to access the physical memory. Notes: It's the applications responsibility to allocate and set up a descriptor for access to the memory. This function shouldn't be used to map real mode addresses.

## Errors

Check the int31error variable.

## See also

allocate_ldt_descriptors |  | Allocate a number of descriptors
set_segment_limit |  | Set descriptor limit
set_segment_base_address |  | Set descriptor's base address

Documentation generated on: May 14 2021