mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Review comments
This commit is contained in:
parent
afe9e6a325
commit
a75d3d1c83
@ -1,8 +1,12 @@
|
||||
#include <base/getPageSize.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
Int64 getPageSize()
|
||||
{
|
||||
return sysconf(_SC_PAGESIZE);
|
||||
Int64 page_size = sysconf(_SC_PAGESIZE);
|
||||
if(page_size == -1)
|
||||
abort();
|
||||
else
|
||||
return sysconf(_SC_PAGESIZE);
|
||||
}
|
||||
|
@ -33,12 +33,10 @@ public:
|
||||
/// Current value is just enough for all tests in our CI. It's not selected in some special
|
||||
/// way. We will have 40 pages with 4KB page size.
|
||||
static constexpr size_t default_stack_size = 192 * 1024; /// 64KB was not enough for tests
|
||||
static constexpr size_t default_page_size = 4096;
|
||||
|
||||
explicit FiberStack(size_t stack_size_ = default_stack_size) : stack_size(stack_size_)
|
||||
{
|
||||
ssize_t tmp_page_size = getPageSize();
|
||||
page_size = (tmp_page_size == -1) ? default_page_size : tmp_page_size;
|
||||
page_size = getPageSize();
|
||||
}
|
||||
|
||||
boost::context::stack_context allocate()
|
||||
|
Loading…
Reference in New Issue
Block a user