weird memory stuff #14
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: apio/Luna#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are issues with fork() and exec() and memory management.
At some point, they corrupt stuff, and a userspace pointer that is perfectly accessible in userspace is "not valid" in a system call, sometimes the kernel panics randomly... aka, moon is unstable right now.
Just putting this on the issue tracker so I don't forget it ^^
Ok, so this is a little bit clearer now. The userspace pointer is still perfectly valid, what happens is KernelHeap believes it's "full" and refuses to allocate space to map it into the kernel's address space. This is caused because something overwrites the data where KernelHeap's page bitmap is located, causing it to believe there are no free pages.
Pretty much non-relevant now. We don't use KernelHeap to map userspace memory right now, so if we did try it it would probably fault. But right now it doesn't, so it's fine.
Except we use physical memory to access user stuff. So we have to stay in the kernel's address space + this will break on machines with more than 16GB of memory, since the bootloader only identity-maps the first 16GB of physical memory for us.