>-----Original Message-----
>From: Justin Erenkrantz [mailto:[EMAIL PROTECTED]
>Sent: Thursday, April 17, 2003 11:59 PM
>To: MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1); '[email protected]'
>Subject: Re: [PATCH] apr_rmm.c
>
>
>--On Thursday, April 17, 2003 9:25 PM -0400 "MATHIHALLI,MADHUSUDAN 
>(HP-Cupertino,ex1)" <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>      I'm seeing a SIGBUS when I try to get ldap working. The 
>SIGBUS is
>> obtained at util_ldap_cache_mgr.c:322, where we're trying to 
>initialize the
>> value of a double variable. The problem happens because the 
>variable address
>> is in the shared memory at a 4-byte alligned address.
>>
>>      The following patch solves the problem. With this, ALL 
>the memory
>> allocation when using apr_rmm is a upper limit of the size 
>of double on the
>> system. i.e., if we ask for 12 bytes of memory, we allocate 
>16 bytes => any
>> memory allocation will automatically be 8-byte alligned.
>
>How about using APR_ALIGN_DEFAULT instead of computing grain?  


Sure - anything to make sure that the allocation is always a multiple of 8
would do :)..

Question : Is 8 sufficient ?. What if there is a "long double" in some data
structure - where the allocation would change again.. The apr_rmm headers
are probably okay - the compiler always allocates 16  bytes.

OR, is it better to have the value '8' in APR_ALIGN_DEFAULT to be determined
during the configure phase ?.

-Madhu


-Madhu

Reply via email to