首页 > 其他 > 详细

QEMU内存分析(三):内存分派

时间:2021-03-02 20:14:08      阅读:49      评论:0      收藏:0      [点我收藏+]

PS:  具体内容待分析,尚不十分清楚

关键结构体 :

/**
 * MemoryRegionSection: describes a fragment of a #MemoryRegion
 *
 * @mr: the region, or %NULL if empty
 * @fv: the flat view of the address space the region is mapped in
 * @offset_within_region: the beginning of the section, relative to @mr‘s start
 * @size: the size of the section; will not exceed @mr‘s boundaries
 * @offset_within_address_space: the address of the first byte of the section
 *     relative to the region‘s address space
 * @readonly: writes to this section are ignored
 */
struct MemoryRegionSection {
    MemoryRegion *mr;
    FlatView *fv;
    hwaddr offset_within_region;
    Int128 size;
    hwaddr offset_within_address_space;
    bool readonly;
};

 

struct AddressSpaceDispatch {
    MemoryRegionSection *mru_section;
    /* This is a multi-level map on the physical address space.
     * The bottom level has pointers to MemoryRegionSections.
     */
    PhysPageEntry phys_map;
    PhysPageMap map;
};

 

QEMU内存分析(三):内存分派

原文:https://www.cnblogs.com/edver/p/14470721.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!