소스 검색

added a madvise for record tables

master
Ludovic 'Archivist' Lagouardette 4 년 전
부모
커밋
3c2e6c561a
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      include/database.hpp
  2. +4
    -0
      include/fsized_map.h

+ 2
- 0
include/database.hpp 파일 보기

@ -87,6 +87,8 @@ public:
tmp.clear();
ret.records.enforce_caching();
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-local-addr"
return std::move(ret);

+ 4
- 0
include/fsized_map.h 파일 보기

@ -157,6 +157,10 @@ class mmap_array : public mmap_ptr
posix_madvise(this->start, mapping_size, map_access);
}
void enforce_caching() {
posix_madvise(this->start, mapping_size, MADV_WILLNEED);
}
constexpr size_t size() {
return item_size;
}

불러오는 중...
취소
저장