Skip to content

[k2] log error on OOM in pool allocator - #1704

Open
Shamzik wants to merge 2 commits into
masterfrom
kshamazov/k2/oom_assertion
Open

Shamzik wants to merge 2 commits into
masterfrom
kshamazov/k2/oom_assertion

Conversation

@Shamzik

@Shamzik Shamzik commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This PR replaces log::assertion with log::error handling OOM in pool allocator.

It is also rewrites kphp::log::impl::log function so it does not call pool allocator recursivly

@Shamzik Shamzik added runtime Feature related to runtime k2 Affects compiler or runtime in K2 mode labels Oct 8, 2026
@Shamzik Shamzik added this to the next milestone Oct 8, 2026
@Shamzik Shamzik self-assigned this Oct 8, 2026
@Shamzik
Shamzik requested review from LLirikkkk and apolyakov and removed request for LLirikkkk October 9, 2026 10:26
kphp::stl::vector<k2::LogTaggedEntry, kphp::memory::script_allocator> tagged_entries{};
tagged_entries.reserve(tagged_entries_size);
size_t tagged_entries_size{};
static constexpr size_t TAGGED_ENTRIES_BUFFER_SIZE = 8UZ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's reserve more space for tags. Something like 20 should be ok for now

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

k2 Affects compiler or runtime in K2 mode runtime Feature related to runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants