From: Jonathan Chambers Date: Sun, 14 Jan 2018 07:23:34 +0000 (+0300) Subject: Implement memory unmapping for Sony PS/3 X-Git-Tag: v8.0.0~427 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a58ccfa02b5b51a91f4d9797ef6932a3fba8cf9;p=gc Implement memory unmapping for Sony PS/3 (part of commit 9379c66 from Unity-Technologies/bdwgc) Issue #173 (bdwgc). * os_dep.c [USE_MUNMAP && !MSWIN32 && !MSWINCE && SN_TARGET_PS3]: Include sys/mman.h instead of sys/memory.h. * os_dep.c [USE_MUNMAP && !USE_WINALLOC && SN_TARGET_PS3] (GC_unmap): Call ps3_free_mem() instead of mmap(). --- diff --git a/os_dep.c b/os_dep.c index d4ff12c5..5827706d 100644 --- a/os_dep.c +++ b/os_dep.c @@ -2433,7 +2433,11 @@ void * os2_alloc(size_t bytes) #if !defined(MSWIN32) && !defined(MSWINCE) # include -# include +# ifdef SN_TARGET_PS3 +# include +# else +# include +# endif # include # include #endif @@ -2490,6 +2494,8 @@ GC_INNER void GC_unmap(ptr_t start, size_t bytes) start_addr += free_len; len -= free_len; } +# elif defined(SN_TARGET_PS3) + ps3_free_mem(start_addr, len); # else /* We immediately remap it to prevent an intervening mmap from */ /* accidentally grabbing the same address space. */