diff options
author | Anton Kling <anton@kling.gg> | 2024-07-06 20:47:14 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-07-06 20:47:14 +0200 |
commit | abcba25c5f5579e50ab205d8fc01ca9dbaa0f5e8 (patch) | |
tree | 02187d5cd1e3a14002ef3d350039ec3995310dd8 /kernel/drivers | |
parent | 6d6289f0fb3b07b0d1a02f671df6b096318d4a4c (diff) |
Kernel: Add kmalloc scan
This will scan for possible overflows in the program. It is a somewhat
expensive operation but really useful for debugging.
Diffstat (limited to 'kernel/drivers')
-rw-r--r-- | kernel/drivers/pit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/drivers/pit.c b/kernel/drivers/pit.c index b875449..8210aa7 100644 --- a/kernel/drivers/pit.c +++ b/kernel/drivers/pit.c @@ -1,5 +1,6 @@ #include "pit.h" #include <arch/i386/tsc.h> +#include <kmalloc.h> #include <random.h> #define PIT_IO_CHANNEL_0 0x40 @@ -47,6 +48,7 @@ u64 last_tsc = 0; extern u64 timer_current_uptime; extern int is_switching_tasks; void int_clock(reg_t *regs) { + kmalloc_scan(); u64 current_tsc = tsc_get(); timer_current_uptime = tsc_calculate_ms(current_tsc); random_add_entropy_fast((u8 *)¤t_tsc, sizeof(current_tsc)); |