Skip to content

Commit

Permalink
native,platform: remove pmem protection to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
sashimi-yzh committed Jan 10, 2021
1 parent 39b2c43 commit 18995de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions am/src/native/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 18995de

Please sign in to comment.