8000 Converted int literals to size_t by goedderz · Pull Request #21840 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Converted int literals to size_t #21840

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

Merged
merged 1 commit into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions arangod/RestServer/ApiRecordingFeature.cpp
8000
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ void ApiRecordingFeature::collectOptions(
options->addOption(
"--server.api-recording-memory-limit",
"Size limit for the list of API call records.",
new UInt64Parameter(&_totalMemoryLimitCalls, 1, 256 * 1024,
256 * 1024 * 1024 * 1024),
new UInt64Parameter(&_totalMemoryLimitCalls, 1,
256 * (std::size_t{1} << 10), // Min: 256 KiB
256 * (std::size_t{1} << 30) // Max: 256 GiB
),
arangodb::options::makeDefaultFlags(arangodb::options::Flags::Uncommon));

options->addOption(
Expand All @@ -85,8 +87,10 @@ void ApiRecordingFeature::collectOptions(
options->addOption(
"--server.aql-recording-memory-limit",
"Size limit for the list of AQL query records.",
new UInt64Parameter(&_totalMemoryLimitQueries, 1, 256 * 1024,
256 * 1024 * 1024 * 1024),
new UInt64Parameter(&_totalMemoryLimitQueries, 1,
256 * (std::size_t{1} << 10), // Min: 256 KiB
256 * (std::size_t{1} << 30) // Max: 256 GiB
),
arangodb::options::makeDefaultFlags(arangodb::options::Flags::Uncommon));

options
Expand Down
5 changes: 3 additions & 2 deletions arangod/RestServer/ApiRecordingFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ class ApiRecordingFeature : public ArangodFeature {
bool _enabledQueries{true};

// Total memory limit for all ApiCallRecord lists combined
size_t _totalMemoryLimitCalls{25 * 1024 * 1024}; // Default: ~25MiB
size_t _totalMemoryLimitCalls{25 * (std::size_t{1} << 20)}; // Default: 25MiB

// Total memory limit for all AqlCallRecord lists combined
size_t _totalMemoryLimitQueries{25 * 1024 * 1024}; // Default: ~25MiB
size_t _totalMemoryLimitQueries{25 *
(std::size_t{1} << 20)}; // Default: 25MiB

// Memory limit for one list of ApiCallRecords (calculated as
// _totalMemoryLimitCalls / NUMBER_OF_API_RECORD_LISTS)
Expand Down
0