WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 51984
46252
[Qt] [WebKit2] Shared memory design should be improved
https://bugs.webkit.org/show_bug.cgi?id=46252
Summary
[Qt] [WebKit2] Shared memory design should be improved
Balazs Kelemen
Reported
2010-09-22 02:16:01 PDT
In 4594 a heated debate had been started about the shared memory implementation. We should reconsider how to allocate the shared memory and how to release it on exit.
Attachments
Add attachment
proposed patch, testcase, etc.
Balazs Kelemen
Comment 1
2010-09-22 02:24:24 PDT
We already have a platform independent shared memory implementation: QSharedMemory. I do not understand why we do not use that. I remember that Kenneth told me that it has some problems with releasing the allocated area. Please explain the arguments against QSharedMemory in more details.
Kenneth Rohde Christiansen
Comment 2
2010-09-22 10:14:56 PDT
(In reply to
comment #1
)
> We already have a platform independent shared memory implementation: QSharedMemory. I do not understand why we do not use that. I remember that Kenneth told me that it has some problems with releasing the allocated area. > Please explain the arguments against QSharedMemory in more details.
1) It is limited to 2MB on mac and it is not something normal users are going to change 2) If an app crashes the shared memory is not freed, so we will have even less memory What do you have against I/O mapped memory? The memory is never being written to disk/flushed and we do not have any limit.
Balazs Kelemen
Comment 3
2010-09-22 11:10:09 PDT
> 1) It is limited to 2MB on mac and it is not something normal users are going to change
I think this should be fixed in QSharedMemory with the trick we are using.
> 2) If an app crashes the shared memory is not freed, so we will have even less memory
Really? If all of the processes died or terminated that using the shared memory then the OS reclaims it, isn't it?
> > What do you have against I/O mapped memory? The memory is never being written to disk/flushed and we do not have any limit.
I find the files somewhat useless since on linux or windows you can allocate virtual address space without underlying files. If you cannot do it on mac then I am fine with the I/O mapped memory. (A comment should be added about that.) Anyway, we should fix the problems you mentioned in 4594.
Andras Becsi
Comment 4
2010-09-27 07:44:37 PDT
(In reply to
comment #0
)
> In 4594 a heated debate had been started about the shared memory implementation.
The discussion started in
https://bugs.webkit.org/show_bug.cgi?id=45984
.
Siddharth Mathur
Comment 5
2010-11-18 06:46:32 PST
BTW, on Symbian OS there is no native concept of a file-mapped virtual memory AFAIK, so the only correct way to do shared memory in a scalable and performant way is to either: a) Use QSharedMemory (which uses Symbian OS RChunk, the entry point into kernel's memory management features) b) Use RChunk API directly in case QSharedMemory's RChunk usage is too simplistic or inefficient for Webkit'2 demanding needs.
Balazs Kelemen
Comment 6
2010-11-19 04:48:07 PST
(In reply to
comment #5
)
> BTW, on Symbian OS there is no native concept of a file-mapped virtual memory AFAIK, so the only correct way to do shared memory in a scalable and performant way is to either: > a) Use QSharedMemory (which uses Symbian OS RChunk, the entry point into kernel's memory management features) > b) Use RChunk API directly in case QSharedMemory's RChunk usage is too simplistic or inefficient for Webkit'2 demanding needs.
I vote for QSharedMemory. We are also using it in the SharedMemory class.
Balazs Kelemen
Comment 7
2011-01-25 10:03:34 PST
This job has been done by
http://trac.webkit.org/changeset/76507
*** This bug has been marked as a duplicate of
bug 51984
***
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