mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 19:10:30 +00:00
[metal] Clean up code for getting pointer to struct mman
(#828)
Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
parent
5a6a4819d4
commit
e47c0cc929
5 changed files with 8 additions and 6 deletions
|
@ -46,7 +46,7 @@ noasan struct DirectMap sys_mmap_metal(void *vaddr, size_t size, int prot,
|
|||
struct mman *mm;
|
||||
struct DirectMap res;
|
||||
uint64_t addr, faddr = 0, page, e, *pte, *fdpte, *pml4t;
|
||||
mm = (struct mman *)(BANE + 0x0500);
|
||||
mm = __get_mm();
|
||||
pml4t = __get_pml4t();
|
||||
size = ROUNDUP(size, 4096);
|
||||
addr = (uint64_t)vaddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue