head 1.2; access; symbols pkgsrc-2020Q3:1.1.0.20 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.18 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.14 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.16 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.12 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.10 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.8 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.6 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.4 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.2 pkgsrc-2018Q2-base:1.1; locks; strict; comment @// @; 1.2 date 2020.11.11.09.52.00; author nia; state dead; branches; next 1.1; commitid CwfADKOANACW8svC; 1.1 date 2018.05.11.19.18.35; author jperkin; state Exp; branches; next ; commitid PMv8Ivd9h0E2GUBA; desc @@ 1.2 log @Remove spidermonkey52 - it's no longer used. @ text @$NetBSD: patch-js_src_gc_Memory.cpp,v 1.1 2018/05/11 19:18:35 jperkin Exp $ Support SunOS/x86_64. --- js/src/gc/Memory.cpp.orig 2018-04-28 01:04:03.000000000 +0000 +++ js/src/gc/Memory.cpp @@@@ -501,7 +501,7 @@@@ static inline void* MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE, int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0) { -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) +#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0); #endif void* region = mmap(desired, length, prot, flags, fd, offset); @@@@ -551,7 +551,7 @@@@ MapMemory(size_t length, int prot = PROT return nullptr; } return region; -#elif defined(__aarch64__) +#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) /* * There might be similar virtual address issue on arm64 which depends on * hardware and kernel configurations. But the work around is slightly @@@@ -763,7 +763,11 @@@@ MarkPagesUnused(void* p, size_t size) return false; MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0); +#ifdef __sun + int result = posix_madvise(p, size, MADV_DONTNEED); +#else int result = madvise(p, size, MADV_DONTNEED); +#endif return result != -1; } @ 1.1 log @spidermonkey52: Add support for SunOS. Works well enough to only produce 7 minor failures out of 6679 regression tests. @ text @d1 1 a1 1 $NetBSD$ @