generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from amosproj/garbage-collection
Garbage collection
- Loading branch information
Showing
37 changed files
with
1,006 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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,19 @@ | ||
# SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
[submodule "rust/garbage-collection/art"] | ||
path = rust/garbage-collection/art | ||
url = https://android.googlesource.com/platform/art | ||
[submodule "rust/garbage-collection/bionic"] | ||
path = rust/garbage-collection/bionic | ||
url = https://android.googlesource.com/platform/bionic | ||
[submodule "rust/garbage-collection/external/tinyxml2"] | ||
path = rust/garbage-collection/external/tinyxml2 | ||
url = https://android.googlesource.com/platform/external/tinyxml2 | ||
[submodule "rust/garbage-collection/external/fmtlib"] | ||
path = rust/garbage-collection/external/fmtlib | ||
url = https://android.googlesource.com/platform/external/fmtlib | ||
[submodule "rust/garbage-collection/system/libbase"] | ||
path = rust/garbage-collection/system/libbase | ||
url = https://android.googlesource.com/platform/system/libbase |
This file contains 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 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 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 |
---|---|---|
|
@@ -4,10 +4,12 @@ | |
// SPDX-FileCopyrightText: 2024 Felix Hilgers <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 Luca Bretting <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 Tom Weisshuhn <[email protected]> | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use bytemuck::{checked::CheckedCastError, AnyBitPattern, CheckedBitPattern}; | ||
use garbage_collection::Heap; | ||
|
||
|
||
pub trait TryFromRaw: Sized { | ||
|
@@ -38,6 +40,12 @@ impl TryFromRaw for SysSigquitCall { | |
} | ||
} | ||
|
||
impl TryFromRaw for SysGcCall { | ||
fn try_from_raw(raw: &[u8]) -> Result<Self, CheckedCastError> { | ||
Ok(*bytemuck::checked::try_from_bytes(raw)?) | ||
} | ||
} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone, AnyBitPattern)] | ||
pub struct VfsWriteCall { | ||
|
@@ -123,6 +131,14 @@ impl SysSigquitCall { | |
} | ||
} | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Copy, Clone, CheckedBitPattern)] | ||
pub struct SysGcCall { | ||
pub pid: u32, | ||
pub tid: u32, | ||
pub heap: Heap | ||
} | ||
|
||
// ---------------------------------- | ||
// generate a unique id from pid and tid | ||
#[inline(always)] | ||
|
This file contains 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 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 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 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.