Repository navigation
Refactor/memory limit #331
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
Closed
Closed
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2bda940
refactor(process): introduce shared memory limit policy
sgt57 0452c55
refactor(process): supervise Unix memory through shared limit policy
sgt57 86ab3f9
refactor(process): enforce Windows memory limits with execution jobs
sgt57 32f9f51
refactor(process): centralize exit outcomes and bound process cleanup
sgt57 52963a1
test(process): cover memory accounting and prelimit failures
sgt57 ce5bed6
style: format codes
actions-user c5178a6
fix(process): protect memory accounting from Windows max macro
sgt57 85d0d8c
style: format codes
actions-user d5fdeba
fix(ci): skip Qt deployment for memory limiter test
sgt57 24956a1
fix(tests): statically link MinGW sandbox helper runtime
sgt57 b4fc9c1
fix(tests): guard sandbox handle queries with SEH
sgt57 99756a4
fix(tests): address Codacy memory supervision findings
sgt57 414b7c0
style: format codes
actions-user ed2aea7
refactor(process): account memory by declared usage only
sgt57 a7a52b4
test(process): distinguish private commit from working set
sgt57 1886ec1
refactor(process): remove redundant execution outcome types
sgt57 921e716
refactor(process): replace unused interfaces with platform functions
sgt57 0592d8e
test(process): compare Unix memory reports with native counters
sgt57 b11229c
test(process): verify reported private commit at multiple sizes
sgt57 e2883c8
ci: fix macos ci
sgt57 586aa20
refactor(process): use event-driven monitoring on Linux and macOS
sgt57 dfbef21
style: format codes
actions-user adc09f0
refactor(process): use event-driven waits on Windows
sgt57 4eadf75
refactor(process): remove periodic sampling on Linux and Windows
sgt57 6ae31aa
style: format codes
actions-user c2dcfec
test(process): remove sampling delays from memory fixtures
sgt57 bf3a0c4
fix(process): expand stack on Linux when there is no memory limit
sgt57 b7de2d5
refactor(process): inline memory limit checks and localize Windows he…
sgt57 ffaa181
style: format codes
actions-user 2921869
fix(process): wait for watcher exit after forced termination
sgt57 4ad1583
refactor: simplify code
sgt57 584b7b2
fix(ci): update macos ci target to 11.0
sgt57 ab0137a
fix(windows): reap suspended processes outside the job
sgt57 b1837f1
fix(windows): enforce memory limit before resuming the process
sgt57 bdd9e46
fix(linux): preserve stop and continue under ptrace
sgt57 68cab6c
fix(linux): retain VSS peaks across exec
sgt57 3bb9303
style: format codes
actions-user 3c372b6
Merge branch 'master' into refactor/memory-limit
sgt57 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
| #pragma once | ||
|
|
||
| #include <cstdint> | ||
| #include <limits> | ||
|
|
||
| namespace Lemon::Execution { | ||
| using Bytes = std::int64_t; | ||
| inline constexpr Bytes KiB = 1024; | ||
| inline constexpr Bytes MiB = KiB * 1024; | ||
|
|
||
| inline bool memoryBytes(std::int64_t mib, Bytes &bytes) { | ||
| if (mib < 0) { | ||
| bytes = -1; | ||
| return true; | ||
| } | ||
| if (mib > (std::numeric_limits<Bytes>::max)() / MiB) | ||
| return false; | ||
| bytes = mib * MiB; | ||
| return true; | ||
| } | ||
| } // namespace Lemon::Execution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?