Skip to content

Commit b1cf860

Browse files
committed
Nits.
1 parent e43f687 commit b1cf860

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

kernels1/kernel.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ void exception(regstate* regs) {
256256
proc_panic(current, "Kernel page fault on %p (%s %s, rip=%p)!\n",
257257
addr, operation, problem, regs->reg_rip);
258258
}
259-
error_printf(CPOS(24, 0), 0x0C00,
260-
"Process %d page fault on %p (%s %s, rip=%p)!\n",
261-
current->pid, addr, operation, problem, regs->reg_rip);
259+
error_printf(CPOS(24, 0), COLOR_ERROR,
260+
"Process %d page fault on %p (%s %s, rip=%p)!\n",
261+
current->pid, addr, operation, problem, regs->reg_rip);
262262
current->state = P_FAULTED;
263263
break;
264264
}

kernels1/p-bigdata.cc

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ alignas(4096) char big_data[8192];
55
void process_main() {
66
strcpy(&big_data[4086], "CS 61 Is Awful\n");
77
strcpy(&big_data[0], "mazing\n");
8+
9+
//console_printf("@va %p: %s\n", &big_data[0], &big_data[0]);
10+
//console_printf("@va %p: %.10s\n", &big_data[4086], &big_data[4086]);
11+
//console_printf("@va %p: %s\n", &big_data[4096], &big_data[4096]);
12+
813
console_printf(0x3000, "%s", &big_data[4086]);
914
while (true) {
1015
sys_yield();

0 commit comments

Comments
 (0)