-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <dev@notgull.net>
- Loading branch information
Showing
2 changed files
with
55 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters