代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libhugetlbfs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 7c371e7de53554166711e0bcc37df94d0a78edd3 Mon Sep 17 00:00:00 2001
From: sangyan <[email protected]>
Date: Fri, 21 Apr 2017 14:35:03 +0800
Subject: [PATCH] elflink.c: remap segments with MAP_SHARED flag
Mmapping segment with MAP_PRIVATE will create a private
copy-on-write mapping, as a result updates to the mapping
will cost extra pages. It will cost double number of pages
in the worst case, so we change to MAP_SHARED flag.
It is also safe to mmap a unlinked file or a read-only file.
---
elflink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elflink.c b/elflink.c
index b746b26..8187ee0 100644
--- a/elflink.c
+++ b/elflink.c
@@ -1131,7 +1131,7 @@ static void remap_segments(struct seg_info *seg, int num)
start = ALIGN_DOWN((unsigned long)seg[i].vaddr, hpage_size);
offset = (unsigned long)(seg[i].vaddr - start);
mapsize = ALIGN(offset + seg[i].memsz, hpage_size);
- mmap_flags = MAP_PRIVATE|MAP_FIXED;
+ mmap_flags = MAP_SHARED|MAP_FIXED;
/* If requested, make no reservations */
if (__hugetlb_opts.no_reserve)
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。