aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/memory/memory.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-08-22 18:16:09 +0200
committerGitHub Enterprise <[email protected]>2025-08-22 18:16:09 +0200
commitfb6426127354415505dbedacd63b3a16116dac2f (patch)
treebbc39a085433b1e837fb07ea4e4399ba932dbdca /src/zencore/memory/memory.cpp
parentavoid new in static IoBuffer (#472) (diff)
downloadzen-fb6426127354415505dbedacd63b3a16116dac2f.tar.xz
zen-fb6426127354415505dbedacd63b3a16116dac2f.zip
clean up trace options parsing (#473)
* clean up trace command line options explicitly shut down worker pools * some additional startup trace scopes
Diffstat (limited to 'src/zencore/memory/memory.cpp')
-rw-r--r--src/zencore/memory/memory.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/zencore/memory/memory.cpp b/src/zencore/memory/memory.cpp
index f236796ad..ae1b9abce 100644
--- a/src/zencore/memory/memory.cpp
+++ b/src/zencore/memory/memory.cpp
@@ -87,14 +87,19 @@ InitGMalloc()
}
};
- constexpr std::string_view MallocOption = "--malloc="sv;
+ constexpr std::string_view MallocOption = "--malloc"sv;
std::function<void(const std::string_view&)> ProcessArg = [&](const std::string_view& Arg) {
if (Arg.starts_with(MallocOption))
{
- const std::string_view OptionArgs = Arg.substr(MallocOption.size());
+ std::string_view::value_type DelimChar = Arg[MallocOption.length()];
- IterateCommaSeparatedValue(OptionArgs, ProcessMallocArg);
+ if (DelimChar == ' ' || DelimChar == '=')
+ {
+ const std::string_view OptionArgs = Arg.substr(MallocOption.size() + 1);
+
+ IterateCommaSeparatedValue(OptionArgs, ProcessMallocArg);
+ }
}
};