|
|
|
@ -72,14 +72,17 @@ async fn main() -> Result<(), anyhow::Error> {
|
|
|
|
|
{% endif %}
|
|
|
|
|
env_logger::init();
|
|
|
|
|
|
|
|
|
|
if !Resource::MEMLOCK
|
|
|
|
|
.set(rlimit::INFINITY, rlimit::INFINITY)
|
|
|
|
|
.is_ok()
|
|
|
|
|
{
|
|
|
|
|
let rlim = libc::rlimit{
|
|
|
|
|
rlim_cur: libc::RLIM_INFINITY,
|
|
|
|
|
rlim_max: libc::RLIM_INFINITY,
|
|
|
|
|
};
|
|
|
|
|
let ret = unsafe { libc::setrlimit(libc::RLIMIT_MEMLOCK, &rlim) };
|
|
|
|
|
if !ret == 0{
|
|
|
|
|
warn!("cannot remove mem lock");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This will include your eBPF object file as raw bytes at compile-time and load it at
|
|
|
|
|
// runtime. This approach is recommended for most real-world use cases. If you would
|
|
|
|
|
// like to specify the eBPF program at runtime rather than at compile-time, you can
|
|
|
|
|