Commit bbe77210 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

criu/proc: Define BUF_SIZE without PAGE_SIZE dependency

PAGE_SIZE will be a variable value on platforms where it can be
different due to large pages.
And looks like (c) there is no reason for BUF_SIZE == PAGE_SIZE,
so let's keep it as it was, rather than complicating it with dynamic
allocation for the buffer.
Signed-off-by: 's avatarDmitry Safonov <dima@arista.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent a58e95aa
...@@ -61,16 +61,16 @@ ...@@ -61,16 +61,16 @@
#define SIGEV_THREAD_ID 4 /* deliver to thread */ #define SIGEV_THREAD_ID 4 /* deliver to thread */
#endif #endif
#define BUF_SIZE 4096 /* Good enough value - can be changed */
struct buffer { struct buffer {
char buf[PAGE_SIZE]; char buf[BUF_SIZE];
char end; /* '\0' */ char end; /* '\0' */
}; };
static struct buffer __buf; static struct buffer __buf;
static char *buf = __buf.buf; static char *buf = __buf.buf;
#define BUF_SIZE sizeof(__buf.buf)
/* /*
* This is how AIO ring buffers look like in proc * This is how AIO ring buffers look like in proc
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment