We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Platform::address_size
1 parent 75f4b93 commit bc5e0b8Copy full SHA for bc5e0b8
rust/src/platform.rs
@@ -165,6 +165,12 @@ impl Platform {
165
unsafe { CoreArchitecture::from_raw(BNGetPlatformArchitecture(self.handle)) }
166
}
167
168
+ /// Get the address size of the platform, this is typically the same as the architecture's address size,
169
+ /// but some platforms like Linux x86_64 x32 ABI have differing address sizes from architecture.
170
+ pub fn address_size(&self) -> usize {
171
+ unsafe { BNGetPlatformAddressSize(self.handle) }
172
+ }
173
+
174
pub fn type_container(&self) -> TypeContainer {
175
let type_container_ptr = NonNull::new(unsafe { BNGetPlatformTypeContainer(self.handle) });
176
// NOTE: I have no idea how this isn't a UAF, see the note in `TypeContainer::from_raw`
0 commit comments