mirror of
https://github.com/gperftools/gperftools
synced 2024-12-19 05:54:34 +00:00
always use full 64 bits of address on Solaris
Solaris has somewhat nice behavior of mmaps where high bits of address are set. It still uses only 48 bits of address on x86 (and, presumably, 64-bit arm), just with somewhat non-standard way. But this behavior causes some inconveniences to us. In particular, we had to disable mmap sys allocator and had failing emergency malloc tests (due to assertion in TryGetSizeClass in CheckCachedSizeClass). We could consider more comprehensive fix, but lets just do "honest" 64-bit addresses at least for now.
This commit is contained in:
parent
8be31af0fc
commit
2b0b119b6d
@ -116,7 +116,7 @@ static const int kMaxDynamicFreeListLength = 8192;
|
||||
|
||||
static const Length kMaxValidPages = (~static_cast<Length>(0)) >> kPageShift;
|
||||
|
||||
#if __aarch64__ || __x86_64__ || _M_AMD64 || _M_ARM64
|
||||
#if (__aarch64__ || __x86_64__ || _M_AMD64 || _M_ARM64) && !__sun__
|
||||
// All current x86_64 processors only look at the lower 48 bits in
|
||||
// virtual to physical address translation. The top 16 are all same as
|
||||
// bit 47. And bit 47 value 1 reserved for kernel-space addresses in
|
||||
|
@ -382,12 +382,6 @@ void InitSystemAllocators(void) {
|
||||
// pointer).
|
||||
DefaultSysAllocator *sdef = default_space.Construct();
|
||||
bool want_mmap = kDebugMode && (sizeof(void*) > 4);
|
||||
#if __sun__
|
||||
// TODO: solaris has nice but annoying feature that makes it use
|
||||
// full range of addresses and mmap tends to use it. Making mmap-ed
|
||||
// addresses be 0xffff... For now lets avoid the trouble.
|
||||
want_mmap = false;
|
||||
#endif
|
||||
if (want_mmap) {
|
||||
sdef->SetChildAllocator(mmap, 0, mmap_name);
|
||||
sdef->SetChildAllocator(sbrk, 1, sbrk_name);
|
||||
|
Loading…
Reference in New Issue
Block a user