Skip to content

Expose MemoryMapIter in API #616

@tsoutsman

Description

@tsoutsman

Hi, I'm creating a frame allocator for my UEFI bootloader and have encountered some problems with memory_map. Since memory_map returns a generic rather than a concrete type, my frame allocator needs generics:

pub struct FrameAllocator<'a, I>
where
    I: ExactSizeIterator<Item = &'a MemoryDescriptor> + Clone,
{
    memory_map: I,
    // other fields
}

This means that anything using my frame allocator also needs generics.

Using generics isn't great, but obviously isn't the end of the world. There may be better reasons for the output type to remain generic, I'm just showing my specific use case.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions