Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Apr 2012 23:45:05 -0700
From:      Jason Evans <jasone@freebsd.org>
To:        "Jayachandran C." <jchandra@freebsd.org>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: 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...
Message-ID:  <A0CAC76D-5FD8-4E8C-A825-DD439482ECDC@freebsd.org>
In-Reply-To: <CA%2B7sy7D1XLJy8s2i59naqMP=XSL%2BkqXLJg87QonaW9oS22Axmg@mail.gmail.com>
References:  <201204170722.q3H7ME6A070934@svn.freebsd.org> <CA%2B7sy7D1XLJy8s2i59naqMP=XSL%2BkqXLJg87QonaW9oS22Axmg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 23, 2012, at 11:35 PM, Jayachandran C. wrote:
> On Tue, Apr 17, 2012 at 12:52 PM, Jason Evans <jasone@freebsd.org> =
wrote:
>> Author: jasone
>> Date: Tue Apr 17 07:22:14 2012
>> New Revision: 234370
>> URL: http://svn.freebsd.org/changeset/base/234370
>=20
> [....]
>> +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
>=20
> This breaks 64-bit mips platforms. I have a simple patch that fixes
> this at http://people.freebsd.org/~jchandra/jemalloc.patch
>=20
> Another possible fix suggested by Juli is to do
> #define  LG_SIZEOF_PTR _MIPS_SZPTR
>=20
> 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 =3D=3D 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. =3D)

Thanks,
Jason=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A0CAC76D-5FD8-4E8C-A825-DD439482ECDC>