• Charlie Jacobsen's avatar
    liblcd-v2: Make room for RAM map region (separate from heap). · b9ce0034
    Charlie Jacobsen authored
    This is kind of like an mmap region, but only for RAM. (The guest
    virtual page tables will be configured for write back).
    
    Use case: You get a RAM capability from some other guy, and you
    want to map it into your physical/virtual address space. This is
    reasonable to figure out manually for big RAM chunks that are
    mapped one/two times. But for little tedious ones (string sharing),
    it's helpful to have an allocator to assist and track free parts
    of guest physical.
    
    The RAM map region uses very course-grained physical address space
    allocation (minimum 64 MBs). This leads to a lot of internal
    fragmentation, but it should be tolerable since the region is big.
    It also means we have a smaller bit of metadata for tracking the
    region.
    b9ce0034
heap.c 8.88 KB