kill $(pgrep -f element)
extern crate libc;
use std::mem;
unsafe {
let my_num: *mut i32 = libc::malloc(mem::size_of::<i32>()) as *mut i32;
if my_num.is_null() {
panic!("failed to allocate memory");
}
libc::free(my_num as *mut libc::c_void);
}
count * size_of::()
bytes from src
to dst
. The source and destination must not overlap.Behavior is undefined if any of the following conditions are violated:
src must be valid for reads of count * size_of::<T>() bytes.
dst must be valid for writes of count * size_of::<T>() bytes.
Both src and dst must be properly aligned.
The region of memory beginning at src with a size of count * size_of::<T>() bytes must not overlap with the region of memory beginning at dst with the same size.
i like how rust cares about UB and they list it clearly on the methodtcpdump -i lo -w emotes.pcap "port 8303"
then spam emotes on local server and then analyse the pcap file w wireshark