Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
beea535f
Commit
beea535f
authored
Aug 28, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swap's block size made into a compile-time parameter
parent
d8b975f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
config.hpp
src/config.hpp
+4
-0
swap.cpp
src/swap.cpp
+3
-2
swap.hpp
src/swap.hpp
+1
-1
No files found.
src/config.hpp
View file @
beea535f
...
...
@@ -62,6 +62,10 @@ namespace zmq
// Maximal delta between high and low watermark.
max_wm_delta
=
1024
,
// Swap inteligently batches data for writing to disk. The size of
// the batch in bytes is specified by this option.
swap_block_size
=
8192
,
// Maximum number of events the I/O thread can process in one go.
max_io_events
=
256
,
...
...
src/swap.cpp
View file @
beea535f
...
...
@@ -36,16 +36,17 @@
#include <algorithm>
#include "swap.hpp"
#include "config.hpp"
#include "atomic_counter.hpp"
#include "err.hpp"
zmq
::
swap_t
::
swap_t
(
int64_t
filesize_
,
size_t
block_size_
)
:
zmq
::
swap_t
::
swap_t
(
int64_t
filesize_
)
:
fd
(
-
1
),
filesize
(
filesize_
),
file_pos
(
0
),
write_pos
(
0
),
read_pos
(
0
),
block_size
(
block_size_
),
block_size
(
swap_block_size
),
write_buf_start_addr
(
0
)
{
zmq_assert
(
filesize
>
0
);
...
...
src/swap.hpp
View file @
beea535f
...
...
@@ -38,7 +38,7 @@ namespace zmq
enum
{
default_block_size
=
8192
};
// Creates the swap.
swap_t
(
int64_t
filesize_
,
size_t
block_size_
=
default_block_size
);
swap_t
(
int64_t
filesize_
);
~
swap_t
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment