This website works better with JavaScript.
Home
Explore
Help
Sign In
Archivist
/
GoJDB
Watch
1
Star
0
Fork
0
Code
Issues
1
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
added a madvise for record tables
master
Ludovic 'Archivist' Lagouardette
5 years ago
parent
847bce9710
commit
3c2e6c561a
2 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
include/database.hpp
+4
-0
include/fsized_map.h
+ 2
- 0
include/database.hpp
View File
@ -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
View File
@ -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
;
}
Write
Preview
Loading…
Cancel
Save