aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode/memsegs_mmap.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/mcode/memsegs_mmap.adb')
-rw-r--r--src/ortho/mcode/memsegs_mmap.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ortho/mcode/memsegs_mmap.adb b/src/ortho/mcode/memsegs_mmap.adb
index 1ee8e7bcf..d007aca63 100644
--- a/src/ortho/mcode/memsegs_mmap.adb
+++ b/src/ortho/mcode/memsegs_mmap.adb
@@ -15,6 +15,9 @@
-- along with GCC; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+
+with System.Storage_Elements;
+
package body Memsegs_Mmap is
function Mmap_Malloc (Size : Natural) return Address;
pragma Import (C, Mmap_Malloc, "mmap_malloc");
@@ -56,9 +59,11 @@ package body Memsegs_Mmap is
Seg.Size := 0;
end Delete;
- procedure Set_Rx (Seg : in out Memseg_Type) is
+ procedure Set_Rx (Seg : in out Memseg_Type;
+ Offset : Natural; Size : Natural)
+ is
+ use System.Storage_Elements;
begin
- Mmap_Rx (Seg.Base, Seg.Size);
+ Mmap_Rx (Seg.Base + Storage_Offset (Offset), Size);
end Set_Rx;
end Memsegs_Mmap;
-