Skip to content

Commit 6e63874

Browse files
devnexenmjp41
authored andcommitted
while at beta3, overriding get_entropy64.
there are not (yet) real userland interface however there are nice templatized C++ ones, a little performance gain from it.
1 parent fa1e328 commit 6e63874

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pal/pal_haiku.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
# include <sys/mman.h>
88

9+
extern uint64_t secure_get_random();
10+
911
namespace snmalloc
1012
{
1113
/**
@@ -43,6 +45,11 @@ namespace snmalloc
4345
mprotect(p, size, PROT_NONE);
4446
# endif
4547
}
48+
49+
static uint64_t get_entropy64()
50+
{
51+
return secure_get_random();
52+
}
4653
};
4754
} // namespace snmalloc
4855
#endif

0 commit comments

Comments
 (0)