WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
230126
[bmalloc] Add API to release heap's large free
https://bugs.webkit.org/show_bug.cgi?id=230126
Summary
[bmalloc] Add API to release heap's large free
Basuke Suzuki
Reported
2021-09-09 14:58:21 PDT
Our platform has a quota for each apps and that is caused by limiting the virtual address space. If the memory is requested from other part (the part outside WebKit), it will crash. In case of high memory usage, sometime it is useful to release bmalloc's large free region to kernel for others to be ready to assign.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-16 14:59:42 PDT
<
rdar://problem/83214563
>
Filip Pizlo
Comment 2
2021-09-17 11:02:21 PDT
(In reply to Basuke Suzuki from
comment #0
)
> Our platform has a quota for each apps and that is caused by limiting the > virtual address space. If the memory is requested from other part (the part > outside WebKit), it will crash. In case of high memory usage, sometime it is > useful to release bmalloc's large free region to kernel for others to be > ready to assign.
So - the key thing is that you need to actually munmap as opposed to madvise to decommit?
Basuke Suzuki
Comment 3
2021-09-17 11:51:56 PDT
(In reply to Filip Pizlo from
comment #2
)
> So - the key thing is that you need to actually munmap as opposed to madvise > to decommit?
Correct.
Filip Pizlo
Comment 4
2021-09-17 11:53:15 PDT
(In reply to Basuke Suzuki from
comment #3
)
> (In reply to Filip Pizlo from
comment #2
) > > So - the key thing is that you need to actually munmap as opposed to madvise > > to decommit? > > Correct.
That's exciting and terrifying! I've been engineering mallocs under the assumption that virtual memory is free and munmap is never necessary. Can you tell me about what your virtual memory quotas look like? For example, if you have a process that uses 50MB on average and 100MB at peak, what virtual memory quota would you be most likely to give it?
Basuke Suzuki
Comment 5
2021-09-17 15:40:52 PDT
(In reply to Filip Pizlo from
comment #4
)
> That's exciting and terrifying!
Indeed.
> I've been engineering mallocs under the assumption that virtual memory is > free and munmap is never necessary.
For my engineer carrier, this is the first case who does have virtual memory and there's hard limit. But yes, it exists.
> Can you tell me about what your virtual memory quotas look like? > > For example, if you have a process that uses 50MB on average and 100MB at > peak, what virtual memory quota would you be most likely to give it?
Sorry I cannot tell the detail of the system in public. Just let you know PlayStation has power comparable with gaming PC, but the resources allowed to be used for system software are very limited. Games are king in our environment.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug