← 输入框|github.com|刷新
Skip to content

an option to replace mimalloc with std::pmr::monotonic_buffer_resource - #1772

Draft
vthriller wants to merge 2 commits into
solvespace:masterfrom
vthriller:unmimalloc
Draft

vthriller wants to merge 2 commits into
solvespace:masterfrom
vthriller:unmimalloc

Conversation

@vthriller

Copy link
Copy Markdown
Contributor

I don't even expect you to merge this in (especially given this), just saw #1722 and decided to throw in an idea.

@ruevs

ruevs commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

I don't even expect you to merge this in (especially given this), just saw #1722 and decided to throw in an idea.

And this

Your expectation is correct ;-)

What is more, before mimalloc we had a "perfectly good" hand written allocator, which still works and I'm reverting to it when building for Windows XP (and 2000). See here https://github.com/ruevs/solvespace/commits/Win2k/

@ruevs
ruevs marked this pull request as draft September 10, 2026 12:08
@phkahler

Copy link
Copy Markdown
Member

@vthriller and @ruevs has anyone tried dropping mimalloc and just using the standard allocator provided by the compiler(s) lately?

@ruevs

ruevs commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

@vthriller and @ruevs has anyone tried dropping mimalloc and just using the standard allocator provided by the compiler(s) lately?

Yes I fairly regularly (last time three weeks ago) drop mimalloc and build a Windows XP version for myself. It works just fine. Can not say anything about performance though.

See here: https://github.com/ruevs/solvespace/tree/Win2k
The latest publicly available build I've made is here: #1036 (comment)

@phkahler

Copy link
Copy Markdown
Member

Yes I fairly regularly (last time three weeks ago) drop mimalloc and build a Windows XP version for myself. It works just fine. Can not say anything about performance though.

Thanks. I'll try that on Linux when I get a chance. The best dependency is no dependency ;-)

ayourk added a commit to ayourk/solvespace that referenced this pull request Oct 9, 2026
- Solver: the trust-region step (0020, PR solvespace#1749) is replaced by a damped
  one whose merit weighs each equation in parameter units. 0020 failed
  to converge on three cases master solves and moved 113 others to a
  different solution; over 904 cases the damped step loses none and
  takes half the Newton iterations.
- Temporary heap: C++17's monotonic buffer by default instead of the
  vendored mimalloc. Same speed, less memory, a smaller library, and no
  architecture-specific allocator code on arm64; mimalloc remains as
  ENABLE_STD_TEMP_HEAP=OFF.
- Build: Eigen 5 is found through its CMake target, a missing Eigen stops
  at configure, and the mimalloc build moves to C++14.

Origin: other, BoykoNeov e298c5e (revision of PR solvespace#1748), upstream draft PR solvespace#1772 (vthriller), and HobbyCAD testing
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.

3 participants