You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to reduce the dependence on libc in my indirect
dependencies. While looking at this crate I noticed some low-hanging
fruit that can be very easily replaced with libc.
- The rand() function can be re-implemented as a simple Wyrand seeded by
the thread ID and the current time.
- libc::memcpy is used at a point where it can be replaced with
ptr::copy_nonoverlapping.
- libc is used for memory allocation at a point where std::alloc can be
used instead. So I use this.
I'm not too familiar with this codebase, so if any of these replacements
are incorrect, please let me know.
The only leftover libc call is mprotect().
Signed-off-by: John Nunley <[email protected]>
0 commit comments