Skip to content
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

Fix Os::Console singleton to be heapless #2896

Merged
merged 6 commits into from
Sep 25, 2024
Merged

Fix Os::Console singleton to be heapless #2896

merged 6 commits into from
Sep 25, 2024

Conversation

LeStarch
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

Os::Console singleton -> heap free placement new singleton.

Os/Console.cpp Outdated
// memory on the in global space as seen here, and then placement-new
// the singleton into that region. Thus constructing on the fly while
// avoiding heap usage.
alignas(Os::Console) U8 _singleton_store[sizeof(Os::Console)];

Check notice

Code scanning / CodeQL

Variable scope too large

The variable _singleton_store is only accessed in [getSingleton](1) and should be scoped accordingly.
Os/Console.cpp Outdated Show resolved Hide resolved
@LeStarch LeStarch requested a review from thomas-bc September 25, 2024 17:50
@LeStarch LeStarch merged commit 8a84f9c into devel Sep 25, 2024
35 of 36 checks passed
@thomas-bc thomas-bc deleted the os/console branch September 26, 2024 00:39
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