[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: malloc and alignment

From: Stefan Monnier
Subject: Re: malloc and alignment
Date: Mon, 16 Jun 2003 19:11:24 -0400

> > So all we need is to make sure that those 8KB are properly aligned.
> > But how can I do that ?
> > It seems the only reliable way is to malloc 16KB and then waste
> > the 8KB that happen to be before/after the aligned part.
> > 
> > Should I just wrap malloc in my own malloc_aligned such that
> > malloc_aligned calls malloc to allocate chunks of say 1MB
> > and then gives them out in aligned packets of 8KB ?
> You could use `memalign'....

How standard is it ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]