JSBigString to MAP_PRIVATE not MAP_SHARED

Reviewed By: mhorowitz

Differential Revision: D6613463

fbshipit-source-id: 2553a0475ade061f3b70ffce90fcf4e0ceb7d9fa
This commit is contained in:
Peter Ammon 2017-12-20 13:36:09 -08:00 committed by Facebook Github Bot
parent 9b147a53d1
commit f9f40cd3e4
1 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,8 @@ public:
const char *c_str() const override {
if (!m_data) {
m_data = (const char *)mmap(0, m_size, PROT_READ, MAP_SHARED, m_fd, m_mapOff);
m_data =
(const char *)mmap(0, m_size, PROT_READ, MAP_PRIVATE, m_fd, m_mapOff);
CHECK(m_data != MAP_FAILED)
<< " fd: " << m_fd
<< " size: " << m_size