Files
snmalloc/src/pal/pal_solaris.h
David CARLIER c6197cb5f2 Illumos systems/Solaris support. (#226)
MAP_NORESERVE flag usage for memory over commit permitted only
 in the mmap context.
2020-07-08 15:35:28 +01:00

30 lines
646 B
C++

#pragma once
#if defined(__sun)
# include "pal_posix.h"
namespace snmalloc
{
/**
* Platform abstraction layer for Solaris. This provides features for this
* system.
*/
class PALSolaris : public PALPOSIX<PALSolaris>
{
public:
/**
* Bitmap of PalFeatures flags indicating the optional features that this
* PAL supports.
*
*/
static constexpr uint64_t pal_features = PALPOSIX::pal_features;
/**
* Solaris requires an explicit no-reserve flag in `mmap` to guarantee lazy
* commit.
*/
static constexpr int default_mmap_flags = MAP_NORESERVE;
};
} // namespace snmalloc
#endif