Index: sys/i386/include/proc.h =================================================================== --- sys/i386/include/proc.h +++ sys/i386/include/proc.h @@ -74,7 +74,7 @@ /* Get the current kernel thread stack usage. */ #define GET_STACK_USAGE(total, used) do { \ struct thread *td = curthread; \ - (total) = td->td_kstack_pages * PAGE_SIZE; \ + (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ (used) = (char *)td->td_kstack + \ td->td_kstack_pages * PAGE_SIZE - \ (char *)&td; \