Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plotter_disk.hpp #202

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/plotter_disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ class DiskPlotter {
bool show_progress = false)
{
// Increases the open file limit, we will open a lot of files.
#ifndef _WIN32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to put these #ifndef back. Note the n in there, this condition is to omit this code on windows, because windows doesn't have rlimits. (this is why this patch fails to build on windows, here)

struct rlimit the_limit = {600, 600};
struct rlimit the_limit = {4096, 4096};
if (-1 == setrlimit(RLIMIT_NOFILE, &the_limit)) {
std::cout << "setrlimit failed" << std::endl;
}
#endif

if (k < kMinPlotSize || k > kMaxPlotSize) {
throw InvalidValueException("Plot size k= " + std::to_string(k) + " is invalid");
}
Expand Down