Skip to content

Commit

Permalink
fix memory_high_watermark parameter according to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Saloed authored and NikolajBjorner committed Aug 3, 2022
1 parent d8c9948 commit d908ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/env_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void env_params::updt_params() {
enable_warning_messages(p.get_bool("warning", true));
memory::set_max_size(megabytes_to_bytes(p.get_uint("memory_max_size", 0)));
memory::set_max_alloc_count(p.get_uint("memory_max_alloc_count", 0));
memory::set_high_watermark(p.get_uint("memory_high_watermark", 0));
memory::set_high_watermark(megabytes_to_bytes(p.get_uint("memory_high_watermark", 0)));
}

void env_params::collect_param_descrs(param_descrs & d) {
Expand Down

3 comments on commit d908ebe

@nunoplopes
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is a good idea as it breaks applications without any warning.
Currently I do:

Z3_global_param_set("memory_high_watermark", "2147483648"); // 2 GBs

Now Alive2's resource limit mechanism will be broken on the next release.

@NikolajBjorner
Copy link
Contributor

Choose a reason for hiding this comment

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

so we revert this change and change the documentation?

@nunoplopes
Copy link
Collaborator

Choose a reason for hiding this comment

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

so we revert this change and change the documentation?

I think that's better than breaking the API.

Please sign in to comment.