A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[simgrid.git]
/
src
/
mc
/
PageStore.hpp
diff --git
a/src/mc/PageStore.hpp
b/src/mc/PageStore.hpp
index
bb6be39
..
80332ea
100644
(file)
--- a/
src/mc/PageStore.hpp
+++ b/
src/mc/PageStore.hpp
@@
-13,7
+13,7
@@
#include <unordered_map>
#include <unordered_set>
#include <unordered_map>
#include <unordered_set>
-#include
<xbt/base.h>
+#include
"xbt/base.h"
#include "src/mc/mc_mmu.h"
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_mmu.h"
#include "src/mc/mc_forward.hpp"
@@
-157,37
+157,33
@@
public: // Debug/test methods
};
};
-
inline __attribute__((always_inline)
)
-
void PageStore::unref_page(std::size_t pageno)
{
+
XBT_ALWAYS_INLINE void PageStore::unref_page(std::size_t pageno
)
+{
if ((--this->page_counts_[pageno]) == 0)
this->remove_page(pageno);
}
if ((--this->page_counts_[pageno]) == 0)
this->remove_page(pageno);
}
-inline __attribute__((always_inline))
-void PageStore::ref_page(size_t pageno)
+XBT_ALWAYS_INLINE void PageStore::ref_page(size_t pageno)
{
++this->page_counts_[pageno];
}
{
++this->page_counts_[pageno];
}
-inline __attribute__((always_inline))
-const void* PageStore::get_page(std::size_t pageno) const
+XBT_ALWAYS_INLINE const void* PageStore::get_page(std::size_t pageno) const
{
return (void*) simgrid::mc::mmu::join(pageno, (std::uintptr_t) this->memory_);
}
{
return (void*) simgrid::mc::mmu::join(pageno, (std::uintptr_t) this->memory_);
}
-inline __attribute__((always_inline))
-std::size_t PageStore::get_ref(std::size_t pageno)
+XBT_ALWAYS_INLINE std::size_t PageStore::get_ref(std::size_t pageno)
{
return this->page_counts_[pageno];
}
{
return this->page_counts_[pageno];
}
-
inline __attribute__((always_inline)
)
-
std::size_t PageStore::size()
{
+
XBT_ALWAYS_INLINE std::size_t PageStore::size(
)
+{
return this->top_index_ - this->free_pages_.size();
}
return this->top_index_ - this->free_pages_.size();
}
-inline __attribute__((always_inline))
-std::size_t PageStore::capacity()
+XBT_ALWAYS_INLINE std::size_t PageStore::capacity()
{
return this->capacity_;
}
{
return this->capacity_;
}