Skip to content

Comments

Alpine image compatibility#257

Draft
sang4lv wants to merge 12 commits intoX-Profiler:masterfrom
YouMindInc:master
Draft

Alpine image compatibility#257
sang4lv wants to merge 12 commits intoX-Profiler:masterfrom
YouMindInc:master

Conversation

@sang4lv
Copy link

@sang4lv sang4lv commented Jan 14, 2026

No description provided.

sang4lv and others added 11 commits January 14, 2026 20:21
Remove mallopt and M_MMAP_THRESHOLD related code to support MUSL libc
(Alpine Linux). The mallopt API is glibc-specific and causes compilation
failures on MUSL-based systems.

Changes:
- Remove mallopt source files (linux.cc, darwin.cc, mallopt_win.cc)
- Remove export_mallopt.cc and export_mallopt.h
- Remove initMallopt binding from xprofiler.cc
- Remove malloptInited and initMallopt from xprofiler.js
- Remove enable_avoid_rss_leak and m_mmap_threshold config options
- Remove mallopt.test.js test file

This is a low-impact change since:
- Only Linux (glibc) had functional implementation
- macOS and Windows had empty stub implementations
- The feature was for RSS leak prevention optimization only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
fix: remove mallopt/M_MMAP_THRESHOLD for MUSL libc compatibility
This adds a new CI job that tests compilation and execution on Alpine
Linux containers, which use MUSL libc instead of glibc. This ensures
the mallopt removal changes work correctly on Alpine-based systems.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Rename package to @youmindinc/xprofiler
- Bump version to 3.2.0 for MUSL libc compatibility
- Remove binary download config, always build from source
- Update repository URLs to YouMindInc fork

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The binary config is still needed for node-pre-gyp to locate the
compiled .node file. Using --build-from-source flag ensures we always
compile locally instead of downloading prebuilt binaries.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
__off64_t is glibc-specific and not available in MUSL libc (Alpine Linux).
This adds a typedef to define __off64_t as off_t when not using glibc.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sang4lv sang4lv marked this pull request as draft January 14, 2026 14:25
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.

1 participant