Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
d8dbd956
R
runtime
项目概览
dotNET Platform
/
runtime
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d8dbd956
编写于
8月 05, 2022
作者:
A
Andrew Au
提交者:
GitHub
8月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid accounting work on 32-bit platforms (#73491)
上级
63b26566
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
22 deletion
+29
-22
src/coreclr/gc/gc.cpp
src/coreclr/gc/gc.cpp
+29
-22
未找到文件。
src/coreclr/gc/gc.cpp
浏览文件 @
d8dbd956
...
@@ -22687,17 +22687,20 @@ heap_segment* gc_heap::unlink_first_rw_region (int gen_idx)
...
@@ -22687,17 +22687,20 @@ heap_segment* gc_heap::unlink_first_rw_region (int gen_idx)
assert (!heap_segment_read_only_p (region));
assert (!heap_segment_read_only_p (region));
dprintf (REGIONS_LOG, ("unlink_first_rw_region on heap: %d gen: %d region: %Ix", heap_number, gen_idx, heap_segment_mem (region)));
dprintf (REGIONS_LOG, ("unlink_first_rw_region on heap: %d gen: %d region: %Ix", heap_number, gen_idx, heap_segment_mem (region)));
#ifdef _DEBUG
#if defined(_DEBUG) && defined(HOST_64BIT)
int old_oh = heap_segment_oh (region);
if (heap_hard_limit_oh[soh])
int old_heap = heap_segment_heap (region)->heap_number;
{
dprintf(3, ("commit-accounting: from %d to temp [%Ix, %Ix) for heap %d", old_oh, get_region_start (region), heap_segment_committed (region), old_heap));
int old_oh = heap_segment_oh (region);
int old_heap = heap_segment_heap (region)->heap_number;
size_t committed = heap_segment_committed (region) - get_region_start (region);
dprintf(3, ("commit-accounting: from %d to temp [%Ix, %Ix) for heap %d", old_oh, get_region_start (region), heap_segment_committed (region), old_heap));
check_commit_cs.Enter();
assert (g_heaps[old_heap]->committed_by_oh_per_heap[old_oh] >= committed);
size_t committed = heap_segment_committed (region) - get_region_start (region);
g_heaps[old_heap]->committed_by_oh_per_heap[old_oh] -= committed;
check_commit_cs.Enter();
check_commit_cs.Leave();
assert (g_heaps[old_heap]->committed_by_oh_per_heap[old_oh] >= committed);
#endif // _DEBUG
g_heaps[old_heap]->committed_by_oh_per_heap[old_oh] -= committed;
check_commit_cs.Leave();
}
#endif // _DEBUG && HOST_64BIT
set_heap_for_contained_basic_regions (region, nullptr);
set_heap_for_contained_basic_regions (region, nullptr);
...
@@ -22721,17 +22724,20 @@ void gc_heap::thread_rw_region_front (int gen_idx, heap_segment* region)
...
@@ -22721,17 +22724,20 @@ void gc_heap::thread_rw_region_front (int gen_idx, heap_segment* region)
}
}
dprintf (REGIONS_LOG, ("thread_rw_region_front on heap: %d gen: %d region: %Ix", heap_number, gen_idx, heap_segment_mem (region)));
dprintf (REGIONS_LOG, ("thread_rw_region_front on heap: %d gen: %d region: %Ix", heap_number, gen_idx, heap_segment_mem (region)));
#ifdef _DEBUG
#if defined(_DEBUG) && defined(HOST_64BIT)
int new_oh = gen_to_oh (gen_idx);
if (heap_hard_limit_oh[soh])
int new_heap = this->heap_number;
{
dprintf(3, ("commit-accounting: from temp to %d [%Ix, %Ix) for heap %d", new_oh, get_region_start (region), heap_segment_committed (region), new_heap));
int new_oh = gen_to_oh (gen_idx);
int new_heap = this->heap_number;
size_t committed = heap_segment_committed (region) - get_region_start (region);
dprintf(3, ("commit-accounting: from temp to %d [%Ix, %Ix) for heap %d", new_oh, get_region_start (region), heap_segment_committed (region), new_heap));
check_commit_cs.Enter();
assert (heap_segment_heap (region) == nullptr);
size_t committed = heap_segment_committed (region) - get_region_start (region);
g_heaps[new_heap]->committed_by_oh_per_heap[new_oh] += committed;
check_commit_cs.Enter();
check_commit_cs.Leave();
assert (heap_segment_heap (region) == nullptr);
#endif // _DEBUG
g_heaps[new_heap]->committed_by_oh_per_heap[new_oh] += committed;
check_commit_cs.Leave();
}
#endif // _DEBUG && HOST_64BIT
set_heap_for_contained_basic_regions (region, this);
set_heap_for_contained_basic_regions (region, this);
}
}
...
@@ -44091,6 +44097,7 @@ HRESULT GCHeap::Initialize()
...
@@ -44091,6 +44097,7 @@ HRESULT GCHeap::Initialize()
{
{
gc_heap::total_physical_mem = GCToOSInterface::GetPhysicalMemoryLimit (&gc_heap::is_restricted_physical_mem);
gc_heap::total_physical_mem = GCToOSInterface::GetPhysicalMemoryLimit (&gc_heap::is_restricted_physical_mem);
}
}
gc_heap::heap_hard_limit_oh[soh] = 0;
#ifdef HOST_64BIT
#ifdef HOST_64BIT
gc_heap::heap_hard_limit = (size_t)GCConfig::GetGCHeapHardLimit();
gc_heap::heap_hard_limit = (size_t)GCConfig::GetGCHeapHardLimit();
gc_heap::heap_hard_limit_oh[soh] = (size_t)GCConfig::GetGCHeapHardLimitSOH();
gc_heap::heap_hard_limit_oh[soh] = (size_t)GCConfig::GetGCHeapHardLimitSOH();
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录