fix: correction du bogue de memoire dans process.c allocation des processes
This commit is contained in:
parent
81e7dcaa50
commit
deea5829d3
|
@ -30,7 +30,7 @@ void initgdt(u32 offset)
|
|||
|
||||
tss0.trapflag = 0x00;
|
||||
tss0.iomap = 0x00;
|
||||
tss0.esp0 = 0x1FFF0;
|
||||
tss0.esp0 = 0x00;
|
||||
tss0.ss0 = SEL_TSS;
|
||||
|
||||
makegdtdes(&tss0, 0x67, SEG_PRESENT | SEG_CODE | SEG_RING3 | SEG_ACCESSED, 0x00, &gdt[7]); /* descripteur de tss */
|
||||
|
|
|
@ -123,12 +123,12 @@ u32 elf_load(u8 * src, u32 pid)
|
|||
|
||||
void task_init()
|
||||
{
|
||||
u32 i = 0;
|
||||
u32 i = 1;
|
||||
processes = (process *) vmalloc(sizeof(process) * MAXNUMPROCESS);
|
||||
while (i++ < MAXNUMPROCESS)
|
||||
while (i < MAXNUMPROCESS)
|
||||
{
|
||||
processes[i].pid = NULL;
|
||||
processes[i].status = STATUS_FREE;
|
||||
processes[i++].status = STATUS_FREE;
|
||||
}
|
||||
processes[0].dump.ss = SEL_KERNEL_STACK;
|
||||
processes[0].dump.esp = KERNEL_STACK_ADDR;
|
||||
|
|
Loading…
Reference in New Issue