-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support VmMapping::resize
#792
Comments
@cchanging I need your input on this issue. |
I agree. This is exactly the approach in Linux. The implememtation seems straight-forward but should still caution with it. We can leverage the |
The current implementation of
VmMapping
lacks the capability to actively resize; it solely relies on merging adjacent VmMappings when their permissions are identical.This functionality deficiency becomes prominent in user heap management, wherein the system creates a mapping of size
USER_HEAP_SIZE_LIMIT
for the user's heap and only adjusts the size of the VMO within the mapping whenbrk
is called.A more appropriate strategy would be to initially establish a modest-sized mapping for the user heap, specifically
USER_HEAP_INIT_SIZE
, and directly resize this mapping as needed during 'brk' operations, withUSER_HEAP_SIZE_LIMIT
serving as the upper boundary. Adopting this approach is mainly due to the usual absence of system-imposed limitations on user heap size. It's impractical to set up an excessively large mapping initially, as it should naturally expand in response to actual demands.Looking ahead, after the completion of page table and page metadata tasks, we ought to consider removing VMOs from the virtual address management in a manner that maintains system efficacy and stability.
The text was updated successfully, but these errors were encountered: