mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
bsd-user: Propagate alignment argument to mmap_find_vma()
Propagate the alignment to mmap_find_vma(), effectively embedding mmap_find_vma_aligned() within mmap_find_vma(). Add a comment in do_bsd_shmat() to clarify alignment above page size is not required. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20250308122842.76377-3-philmd@linaro.org>
This commit is contained in:
parent
019b4e84ed
commit
84d66261be
3 changed files with 6 additions and 10 deletions
|
@ -370,9 +370,11 @@ static inline abi_long do_bsd_shmat(int shmid, abi_ulong shmaddr, int shmflg)
|
|||
if (shmaddr) {
|
||||
host_raddr = shmat(shmid, (void *)g2h_untagged(shmaddr), shmflg);
|
||||
} else {
|
||||
abi_ulong alignment;
|
||||
abi_ulong mmap_start;
|
||||
|
||||
mmap_start = mmap_find_vma(0, shm_info.shm_segsz);
|
||||
alignment = 0; /* alignment above page size not required */
|
||||
mmap_start = mmap_find_vma(0, shm_info.shm_segsz, alignment);
|
||||
|
||||
if (mmap_start == -1) {
|
||||
return -TARGET_ENOMEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue