From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 31 Jan 2005 18:49:52 -1000 From: Tim Newsham To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> In-Reply-To: Message-ID: References: <76195867b7c075504e92d249a17df2ea@orthanc.cc.titech.ac.jp> <445eefa0258b2da0a9497a5f8be79032@ar.aichi-u.ac.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [9fans] allocb question Topicbox-Message-UUID: 3b830358-eace-11e9-9e20-41e7f4b1d025 I'm allocating a block that has special alignment requirements. I'm doing the following: Block *bp; bp = iallocb(EthBufSz + 64); if(bp) bp->rp = (uchar*)ROUNDUP((ulong)bp->rp, 64); return bp; which seems to work, but feels a little dirty. Is this the right way to do this or is there another mechanism I should be using? Tim N.