Skip to content

fix: panic caused memory allocation failure on Linux#489

Merged
medcl merged 1 commit intomainfrom
fix/mem_alloc_failure_linux
May 12, 2025
Merged

fix: panic caused memory allocation failure on Linux#489
medcl merged 1 commit intomainfrom
fix/mem_alloc_failure_linux

Conversation

@SteveLauC
Copy link
Copy Markdown
Member

What does this PR do

On Linux, the Coco app panicked with the following error:

memory allocation of xxx bytes failed

This line of code will https://github.com/infinilabs/pizza/blob/de36b19726d8bc4c4be21bdedcb5d24bdc6d7306/lib/engine/src/store/disk/mod.rs#L892 allocate size * 2 * 8 bytes, and size was set too high, leading to an allocation failure. Decrease size to 100_000 to fix the issue.

Not quite sure why this didn't cause any issue on macOS, possibly because the allocator implementation difference between the 2 platforms.

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@medcl medcl merged commit 386b9cc into main May 12, 2025
@medcl medcl deleted the fix/mem_alloc_failure_linux branch May 12, 2025 07:27
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

Successfully merging this pull request may close these issues.

2 participants