Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PPU Page Faults #3309
btw, have you considered using some other collection other than std list? Maybe something like unordered (multi)map or just forward_list. Also, a lot of the loops could probably be replaced by
Map/set wouldn't add much efficiency since page_fault_notification_entries is indexed by event_queue_id in sys_mmapper_enable_page_fault_notification and by address elsewhere. So, I don't think there's an O(1) solution everywhere without multiple maps. Forward_lists would probably be better for how I'm using it. But, again, so far all games tested only page fault from one thread and have only one thing being notified-- there isn't much point to optimizing data structures while n=1.
I didn't know about std::find_if, but it isn't being used anywhere else in rpcs3's codebase. For readability, would it be worth starting to use it if it's used no where else?