On 09/04/2011 06:46 PM, Michael S. Tsirkin wrote:
>
>  Why pointers?  Regular fields require less upkeep.

Good point. Why does PIIX use pointers? I just copied that ...


It doesn't, at least not completely:


struct PCII440FXState {
    PCIDevice dev;
    MemoryRegion *system_memory;
    MemoryRegion *pci_address_space;
    MemoryRegion *ram_memory;
    MemoryRegion pci_hole;
    MemoryRegion pci_hole_64bit;
    PAMMemoryRegion pam_regions[13];
    MemoryRegion smram_region;
    uint8_t smm_enabled;
    bool smram_enabled;
    PIIX3State *piix3;
};

Arguably, ram_memory and pci_address_space should not be pointers, since this address space is supplied by 440fx.

(pci_hole, pci_hole64, pam_regions[], and smram_regions are all aliases analogous to the bridge windows)

--
error compiling committee.c: too many arguments to function


Reply via email to