On 06/20/2012 04:48 PM, Stefan Monnier wrote: > I'm not completely sure the test is sufficiently thorough to catch all > problems, and more importantly it doesn't test the efficiency > of memalign. If it's just a matter of configure test, different methods may be used. For example, attached code checks whether memalign tends to create holes while allocating (1024 - 8) blocks aligned at 1024-bytes boundary; optimal pad (BLOCK_PADDING in current code) may be detected with the similar way. Dmitry