FreeBSD Bugzilla – Attachment 194794 Details for
Bug 222356
www/firefox: file-backed shared memory performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
firefox patch
patch-shmem (text/plain), 993 bytes, created by
Tijl Coosemans
on 2018-06-30 16:39:56 UTC
(
hide
)
Description:
firefox patch
Filename:
MIME Type:
Creator:
Tijl Coosemans
Created:
2018-06-30 16:39:56 UTC
Size:
993 bytes
patch
obsolete
>--- ipc/chromium/src/base/shared_memory_posix.cc.orig 2018-06-21 20:03:45 UTC >+++ ipc/chromium/src/base/shared_memory_posix.cc >@@ -74,14 +74,9 @@ bool SharedMemory::Create(size_t size) { > ScopedFILE file_closer; > FILE *fp; > >- FilePath path; >- fp = file_util::CreateAndOpenTemporaryShmemFile(&path); >+ int fd = shm_open(SHM_ANON, O_RDWR, 0600); >+ fp = fdopen(fd, "a+"); > >- // Deleting the file prevents anyone else from mapping it in >- // (making it private), and prevents the need for cleanup (once >- // the last fd is closed, it is truly freed). >- file_util::Delete(path); >- > if (fp == NULL) > return false; > file_closer.reset(fp); // close when we go out of scope >@@ -111,7 +106,7 @@ bool SharedMemory::Map(size_t bytes) { > return false; > > memory_ = mmap(NULL, bytes, PROT_READ | (read_only_ ? 0 : PROT_WRITE), >- MAP_SHARED, mapped_file_, 0); >+ MAP_SHARED | MAP_NOSYNC, mapped_file_, 0); > > if (memory_) > max_size_ = bytes;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222356
:
186420
| 194794