Skip to content

Commit

Permalink
while at beta3, overriding get_entropy64.
Browse files Browse the repository at this point in the history
there are not (yet) real userland interface however there are nice templatized C++ ones,
a little performance gain from it.
  • Loading branch information
devnexen authored and mjp41 committed Aug 13, 2021
1 parent fa1e328 commit 6e63874
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pal/pal_haiku.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# include <sys/mman.h>

extern uint64_t secure_get_random();

namespace snmalloc
{
/**
Expand Down Expand Up @@ -43,6 +45,11 @@ namespace snmalloc
mprotect(p, size, PROT_NONE);
# endif
}

static uint64_t get_entropy64()
{
return secure_get_random();
}
};
} // namespace snmalloc
#endif

0 comments on commit 6e63874

Please sign in to comment.