提交 4123e89d 编写于 作者: Y yinchuang

Modify memory tag

Issue:I7OE01
Signed-off-by: Nyinchuang <yinchuang@huawei.com>
test:libctest
上级 d6f74fda
......@@ -126,7 +126,7 @@ struct meta *alloc_meta(void)
if (brk(new) != new) {
ctx.brk = -1;
} else {
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ctx.brk, new - ctx.brk, "heap:meta");
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ctx.brk, new - ctx.brk, "native_heap:meta");
if (need_guard) mmap((void *)ctx.brk, pagesize,
PROT_NONE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, 0);
ctx.brk = new;
......@@ -315,7 +315,7 @@ static struct meta *alloc_group(int sc, size_t req)
free_meta(m);
return 0;
}
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, p, needed, "heap:brk");
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, p, needed, "native_heap:brk");
m->maplen = needed>>12;
ctx.mmap_counter++;
active_idx = (4096-UNIT)/size-1;
......@@ -376,7 +376,7 @@ void *malloc(size_t n)
MAP_PRIVATE|MAP_ANON, -1, 0);
if (p==MAP_FAILED) return 0;
wrlock();
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, p, needed, "heap:mmap");
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, p, needed, "native_heap:mmap");
step_seq();
g = alloc_meta();
if (!g) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册