Skip to content

Create multitenant_memory_manager.go (closes #206) #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RAPIDENN
Copy link

@RAPIDENN RAPIDENN commented Jun 12, 2025

This commit implements the proposal from issue #206.

Implements per-user and per-project namespace isolation with memory limits, LRU eviction, and automatic cleanup after inactivity.

This change addresses a class of long-standing issues caused by unscoped memory and file descriptor usage in multi-session environments. It also prevents known edge cases such as hitting the 1024 FD limit in glibc’s select() implementation—an issue widely discussed by developers due to how it silently breaks applications when the descriptor count exceeds the hardcoded FD_SETSIZE. These bugs are notoriously difficult to trace and have led to crashes, corrupted state, and even exploitation in CTF challenges.

The new memory manager integrates with the language server via a LanguageServerExtension and requires minimal changes to the surrounding codebase. It improves scalability, stability, and memory safety in high-concurrency environments by ensuring each user/project session operates independently with enforced limits.

RAPIDENN added 2 commits June 13, 2025 00:41
This commit implements the proposal from issue Exafunction#206 by @RAPIDENN.

- Solves:
  - Exafunction#63: memory leak (by limiting and cleaning memory usage)
  - Exafunction#176: too many open files (via per-namespace constraints)
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