dylanmc / cs393_vm_api

Virtual memory abstraction & methods for constructing, accessing, manipulating and destroying address spaces
4 stars 28 forks source link

`AddressSpace` methods could use static dispatch #8

Closed rileyshahar closed 1 year ago

rileyshahar commented 1 year ago

I don't think we need dynamic dispatch for these methods, since they're only dealing with one DataSource at once. I think only the underlying storage of mappings needs to dynamically dispatch. Using generics in these methods will allow monomorphization, which is likely faster.

dylanmc commented 1 year ago

Dynamic dispatch in an operating system does sound like a bad idea, so I'm in agreement here.

rileyshahar commented 1 year ago

The current API does need to use dynamic dispatch for the linked list of DataSources in the MapType struct. Probably something to consider in our ultimate data structure deliberations.