svn commit: r234370 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src inclu...

Jayachandran C. jchandra at freebsd.org
Tue Apr 24 06:59:41 UTC 2012


On Tue, Apr 24, 2012 at 12:15 PM, Jason Evans <jasone at freebsd.org> wrote:
> On Apr 23, 2012, at 11:35 PM, Jayachandran C. wrote:
>> On Tue, Apr 17, 2012 at 12:52 PM, Jason Evans <jasone at freebsd.org> wrote:
>>> Author: jasone
>>> Date: Tue Apr 17 07:22:14 2012
>>> New Revision: 234370
>>> URL: http://svn.freebsd.org/changeset/base/234370
>>
>> [....]
>>> +diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h
>>> +new file mode 100644
>>> +index 0000000..2c5797f
>>> +--- /dev/null
>>> ++++ b/include/jemalloc/jemalloc_FreeBSD.h
>>> +@@ -0,0 +1,76 @@
>> [....]
>>> ++#ifdef __mips__
>>> ++#  define LG_SIZEOF_PTR               2
>>> ++#endif
>>
>> This breaks 64-bit mips platforms. I have a simple patch that fixes
>> this at http://people.freebsd.org/~jchandra/jemalloc.patch
>>
>> Another possible fix suggested by Juli is to do
>> #define  LG_SIZEOF_PTR _MIPS_SZPTR
>>
>> Can you please check-in one of these?  If you are busy, I can do the
>> check-in if you approve the changes.
>
> I had planned to do this, based on Juli's suggestion:
>
>> #ifdef __mips__
>> #  if (_MIPS_SZPTR == 64)
>> #    define LG_SIZEOF_PTR 3
>> #  else
>> #    define LG_SIZEOF_PTR 2
>> #  endif
>> #endif
>
> Feel free to check in whichever approach you feel is cleaner.  I can't test it, so you might as well do the honors. =)

I seems to have mis-understood Juli's suggestion (sorry).  Do I need
to update the FREEBSD-diffs file as well?

Thanks,
JC.


More information about the freebsd-mips mailing list