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

Capability.is_valid() treated as a constant by the compiler #38

Open
PhilDay-CT opened this issue Jul 31, 2024 · 0 comments
Open

Capability.is_valid() treated as a constant by the compiler #38

PhilDay-CT opened this issue Jul 31, 2024 · 0 comments

Comments

@PhilDay-CT
Copy link

The followling

{
	size_t size=10;
	auto p1 = malloc(size);		
		
	Debug::log("p1: {} {}", p1, Capability{p1}.is_valid());
	free(p1);
	Debug::log("p1: {} {}", p1, Capability{p1}.is_valid());
}

gives

mem test: heap at start: 4096
mem test: p1: 0x80007b10 (v:1 0x80007b10-0x80007b20 l:0x10 o:0x0 p: G RWcgm- -- ---) true
mem test: p1: 0x80007b10 (v:0 0x80007b10-0x80007b20 l:0x10 o:0x0 p: G RWcgm- -- ---) true
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

No branches or pull requests

1 participant