FSMaxB is a user on mastodon.cloud. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

I just noticed that having access to a memory region (mprotect) can be interpreted as having a resource.

Following the principle, that resource can be encapsulated in an object that automatically unlocks the memory when constructed and locks it again when destructed.