Skip to content

Run FFTW in GC-safe regions#340

Open
JamesWrigley wants to merge 1 commit into
JuliaMath:masterfrom
JamesWrigley:gc
Open

Run FFTW in GC-safe regions#340
JamesWrigley wants to merge 1 commit into
JuliaMath:masterfrom
JamesWrigley:gc

Conversation

@JamesWrigley

Copy link
Copy Markdown
Contributor

Should help prevent GC pressure. In a larger application I observed memory not being reclaimed when doing multithreaded FFTs, which I suspect to be because we were calling FFTW without entering a GC-safe, which blocks the GC when it could be running.

Would it be possible to make a new release with this?

Should help prevent GC pressure.
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.58%. Comparing base (290d161) to head (5e185e7).

Files with missing lines Patch % Lines
src/fft.jl 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #340      +/-   ##
==========================================
+ Coverage   73.45%   73.58%   +0.13%     
==========================================
  Files           5        5              
  Lines         535      549      +14     
==========================================
+ Hits          393      404      +11     
- Misses        142      145       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stevengj

Copy link
Copy Markdown
Member

Does this seem to fix the problem in your application?

@JamesWrigley

Copy link
Copy Markdown
Contributor Author

Not sure, I wasn't able to test it yet. Claude did come up with a smaller local reproducer that did seem to be fixed though. In the real application there's lots of threads doing a lot of allocations so memory usage grew quite quickly with multithreaded plans.

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