Xref: news2.mv.net comp.os.msdos.djgpp:4586 From: latorre AT ix DOT netcom DOT com Newsgroups: comp.os.msdos.djgpp Subject: [?] aligning value returned by calloc/malloc Date: Mon, 03 Jun 1996 17:16:37 -0400 Organization: Netcom Lines: 15 Message-ID: <31B35635.738@ix.netcom.com> NNTP-Posting-Host: frd-md1-18.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp How do I align the value returned by calloc/malloc on a particular byte boundry ? For instance 64 or 128. I saw something like this, 1: size = 1024 2: alignment = 128 3: un_aligned = malloc( size+alignment ) 4: aligned = (un_aligned+size)&~(alignment-1) but could not get 4 to compile. Any thoughts ? ***TIA***