Skip to content

Add RAM-based configurable thread stack size#227

Open
tnidigan wants to merge 1 commit into
qualcomm:mainfrom
tnidigan:ram-based-thread-stack-size
Open

Add RAM-based configurable thread stack size#227
tnidigan wants to merge 1 commit into
qualcomm:mainfrom
tnidigan:ram-based-thread-stack-size

Conversation

@tnidigan
Copy link
Copy Markdown
Contributor

This PR implements dynamic thread stack size based on system RAM.

Changes

  • Reads system RAM from /proc/meminfo
  • Configures stack size: <1GB→2MB, <4GB→4MB, <8GB→8MB, ≥8GB→16MB
  • Uses pthread for custom stack sizes

int8_t isCoreThread;
};

ThreadArgs* args = new ThreadArgs{this, isCoreThread};

Check failure

Code scanning / CodeQL

Incorrect allocation-error handling High

This allocation cannot throw.
This catch block
is unnecessary.
thNode->usePthread = 1;
} else {
// Use default std::thread creation
thNode->th = new std::thread(threadStartRoutine, isCoreThread);

Check failure

Code scanning / CodeQL

Incorrect allocation-error handling High

This allocation cannot throw.
This catch block
is unnecessary.
@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. To prevent automatic closure in 10 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.

@github-actions github-actions Bot added the Stale label May 30, 2026
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@github-actions github-actions Bot removed the Stale label Jun 6, 2026
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