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

Use svcGetInfo to get the address space in find_free_address #481

Open
todo bot opened this issue Sep 18, 2019 · 0 comments
Open

Use svcGetInfo to get the address space in find_free_address #481

todo bot opened this issue Sep 18, 2019 · 0 comments
Assignees
Labels
todo 🗒️ Created by the todo bot

Comments

@todo
Copy link

todo bot commented Sep 18, 2019

We should use svcGetInfo to get the address space in `find_free_address`. This is extremely important as the low addresses (from 0 to ADDRESS_SPACE_MIN) are not usable, but are marked as available by QueryMemory.
Here's a sample implementation for when we'll have GetInfo impl'd.
```rust lazy_static! { static ref ADDRESS_SPACE: (usize, usize) = { let addr_space_base = syscalls::get_info(Process::current(), 12, 0).unwrap(); let addr_space_size = syscalls::get_info(Process::current(), 13, 0).unwrap(); (addr_space_base, addr_space_base + addr_space_size) }; } ```


// TODO: Use svcGetInfo to get the address space in find_free_address
// BODY: We should use svcGetInfo to get the address space in
// BODY: `find_free_address`. This is extremely important as the low
// BODY: addresses (from 0 to ADDRESS_SPACE_MIN) are not usable, but are
// BODY: marked as available by QueryMemory.
// BODY:
// BODY: Here's a sample implementation for when we'll have GetInfo impl'd.
// BODY:
// BODY: ```rust
// BODY: lazy_static! {
// BODY: static ref ADDRESS_SPACE: (usize, usize) = {


This issue was generated by todo based on a TODO comment in 27ab3e4 when #458 was merged. cc @roblabla.
@todo todo bot added the todo 🗒️ Created by the todo bot label Sep 18, 2019
@todo todo bot assigned roblabla Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo 🗒️ Created by the todo bot
Projects
None yet
Development

No branches or pull requests

1 participant