Haiku build fix post refactoring.
This commit is contained in:
committed by
Matthew Parkinson
parent
7ff10c30f1
commit
1b8aa6bc0d
@@ -20,7 +20,7 @@ namespace snmalloc
|
||||
* PAL supports.
|
||||
*
|
||||
*/
|
||||
static constexpr uint64_t pal_features = PALPOSIX::pal_features;
|
||||
static constexpr uint64_t pal_features = PALPOSIX::pal_features | Entropy;
|
||||
|
||||
/**
|
||||
* Haiku requires an explicit no-reserve flag in `mmap` to guarantee lazy
|
||||
@@ -37,6 +37,15 @@ namespace snmalloc
|
||||
SNMALLOC_ASSERT(is_aligned_block<page_size>(p, size));
|
||||
posix_madvise(p, size, POSIX_MADV_DONTNEED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hopefully a temporary workaround until the kernel random feature
|
||||
* is exposed properly in the userspace ?
|
||||
*/
|
||||
static uint64_t get_entropy64()
|
||||
{
|
||||
return PALPOSIX::dev_urandom();
|
||||
}
|
||||
};
|
||||
} // namespace snmalloc
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user