From 18995de2698b26140b660271054a1a37336e3f67 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Sun, 10 Jan 2021 16:43:38 +0800 Subject: [PATCH] native,platform: remove pmem protection to improve performance --- am/src/native/platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/am/src/native/platform.c b/am/src/native/platform.c index c8c8b30..074cc93 100644 --- a/am/src/native/platform.c +++ b/am/src/native/platform.c @@ -197,13 +197,13 @@ int __am_is_sigmask_sti(sigset_t *s) { } void __am_pmem_protect() { - int ret = mprotect(PMEM_START, PMEM_SIZE, PROT_NONE); - assert(ret == 0); +// int ret = mprotect(PMEM_START, PMEM_SIZE, PROT_NONE); +// assert(ret == 0); } void __am_pmem_unprotect() { - int ret = mprotect(PMEM_START, PMEM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC); - assert(ret == 0); +// int ret = mprotect(PMEM_START, PMEM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC); +// assert(ret == 0); } // This dummy function will be called in trm.c.