在Linux内核源代码中,有一些结构初始化为
struct remap_trace *trace = kmalloc(sizeof(*trace), GFP_KERNEL);
*trace = (struct remap_trace) {
.probe = {
.addr = (unsigned long)addr,
.len = size,
.pre_handler = pre,
.post_handler = post,
.private = trace
},
.phys = offset,
.id = atomic_inc_return(&next_id)
}
*trace
,即在这种情况下堆?)