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

LimitMemory should limit up until long.MaxValue #2054

Open
nZeus opened this issue Feb 14, 2025 · 0 comments
Open

LimitMemory should limit up until long.MaxValue #2054

nZeus opened this issue Feb 14, 2025 · 0 comments

Comments

@nZeus
Copy link

nZeus commented Feb 14, 2025

LimitMemory method accepts long as the input parameter, but then compares the input with int.MaxValue.

public static Options LimitMemory(this Options options, long memoryLimit)
{
options.WithoutConstraint(x => x is MemoryLimitConstraint);
if (memoryLimit > 0 && memoryLimit < int.MaxValue)

It should use long.MaxValue instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant