Kernel: Commit the profiling sample buffer memory up front

This avoids getting page faults while storing samples in the timer IRQ.
This commit is contained in:
Andreas Kling 2020-02-21 12:59:46 +01:00
parent 8047ff8205
commit f9a138aa4b

View file

@ -48,6 +48,7 @@ void start(Process& process)
if (!s_profiling_buffer) {
s_profiling_buffer = RefPtr<KBufferImpl>(KBuffer::create_with_size(8 * MB).impl()).leak_ref();
s_profiling_buffer->region().commit();
s_slot_count = s_profiling_buffer->size() / sizeof(Sample);
}