<div dir="ltr"><div dir="ltr"><div>Hello Daniel, <br></div><div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Mon, 20 Jun 2022 at 19:09, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
iirc, the alignment is to sizeof(void*), which is 8.<br>
</blockquote></div><div><br></div><div>The qm allocator naturally returns 16-byte aligned memory. However the definition <br></div><div>of DBG_SR_MEMORY(from 'make cfg' with all the defaults.) causes 16 to drop to 8.<br><br></div><div>Is this intentional?</div><div><br></div><div>Regards</div><div>S-P<br></div><div>//qm naturally aligns on 16 bytes without DBG_QM_MALLOC!<br></div><div><br></div><div>#ifdef DBG_QM_MALLOC<br>#if defined(__CPU_sparc64) || defined(__CPU_sparc)<br>/* tricky, on sun in 32 bits mode long long must be 64 bits aligned<br> * but long can be 32 bits aligned => malloc should return long long<br> * aligned memory */<br>        #define ROUNDTO         sizeof(long long)<br>#else<br>        #define ROUNDTO         sizeof(void*) /* minimum possible ROUNDTO<br>                                                                                * ->heavy debugging*/<br>#endif<br>#else /* DBG_QM_MALLOC */<br>        #define ROUNDTO         16UL /* size we round to, must be = 2^n  and also<br>                                                        * sizeof(qm_frag)+sizeof(qm_frag_end)<br>                                                        * must be multiple of ROUNDTO!<br>                                                        */<br>#endif<br><br><br><br></div></div><br><div class="gmail_quote"><br></div></div>