-
Notifications
You must be signed in to change notification settings - Fork 394
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
Allow unsetting program log buffer after object loading #750
Comments
It should be safe to free the buffer, libbpf doesn't use this buffer after BPF object is loaded. But it's probably also good to improve |
Sure, will do. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to be able to free the memory allocated for program log buffers after loading an object. I assume that's safe to do, but I noticed that
bpf_program__set_log_buf
returns-EBUSY
if the object has been loaded, which makes me wonder if it's safe to free the buffers after all.At what point is it safe to free these buffers? What's the reason
bpf_program__set_log_buf
doesn't allow setting the log buffer after the object has been loaded? Would it be possible to allow setting the buffer to null to give some reasonable assurance that libbpf isn't holding onto a pointer to the log buffer, so that I can free it?The text was updated successfully, but these errors were encountered: