This commit is contained in:
Pavel 2025-03-04 12:24:44 +03:00
parent 0a22217697
commit 43b951be8a
4 changed files with 9 additions and 8 deletions

View File

@ -133,7 +133,7 @@ begin
td^.td_retval[0]:=key;
Writeln('namedobj_create("',_name,'"):',key);
Writeln('namedobj_create(0x',HexStr(QWORD(objp),10),',"',_name,'"):',key);
Result:=0;
end;

View File

@ -1141,7 +1141,7 @@ begin
imgp^.obj,
offset,
vaddr_lo,vaddr_hi,
VM_PROT_RW,prot or VM_PROT_RW,
VM_PROT_RW, VM_PROT_ALL,
MAP_COW_NO_BUDGET,
nil,
false);

View File

@ -119,8 +119,8 @@ const
//0x40000
//0x80000
MAP_ENTRY_2MB_PAGE =$100000;
MAP_ENTRY_IN_BUDGET =$200000;
MAP_ENTRY_NO_COALESCE =$400000;
//vm_flags_t values
@ -1909,7 +1909,8 @@ var
current,entry:vm_map_entry_t;
obj:vm_object_t;
old_prot:vm_prot_t;
ext_flags:Byte;
const
flags_2mb=2;
begin
if (start=__end) then
begin
@ -1954,9 +1955,9 @@ begin
end;
end;
ext_flags:=2; //current^.ext_flags
//flags_2mb:=current^.flags_2mb;
if ((ext_flags and 2)<>0) then
if ((flags_2mb and 2)<>0) then
begin
old_prot:=current^.max_protection;
end else
@ -1964,7 +1965,7 @@ begin
old_prot:=current^.max_protection and VM_PROT_GPU_ALL;
end;
if ((ext_flags and 1)<>0) then
if ((flags_2mb and 1)<>0) then
begin
old_prot:=0;
end;

View File

@ -1036,7 +1036,7 @@ var
size,pageoff:vm_size_t;
begin
size:=len;
prot:=prot and VM_PROT_ALL;
prot:=((prot shr 1) and 1) or (prot and VM_PROT_ALL);
pageoff:=(vm_size_t(addr) and PAGE_MASK);
addr:=addr-pageoff;