mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
Kernel: Replace process' regions vector with a Red Black tree
This should provide some speed up, as currently searches for regions containing a given address were performed in O(n) complexity, while this container allows us to do those in O(logn).
This commit is contained in:
parent
497c759ab7
commit
2c93123daf
Notes:
sideshowbarker
2024-07-18 20:28:19 +09:00
Author: https://github.com/IdanHo
Commit: 2c93123daf
Pull-request: https://github.com/SerenityOS/serenity/pull/6167
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo
7 changed files with 89 additions and 97 deletions
|
@ -203,8 +203,8 @@ void PerformanceEventBuffer::add_process(const Process& process)
|
|||
|
||||
for (auto& region : process.space().regions()) {
|
||||
sampled_process->regions.append(SampledProcess::Region {
|
||||
.name = region.name(),
|
||||
.range = region.range(),
|
||||
.name = region->name(),
|
||||
.range = region->range(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue