This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mallocating 16 byte aligned blocks...
- From: Adam Stein <adam at scan dot mc dot xerox dot com>
- To: gcc-help at gcc dot gnu dot org, kfredrik at cs dot joensuu dot fi
- Date: Tue, 12 Aug 2003 08:50:14 -0400 (EDT)
- Subject: Re: mallocating 16 byte aligned blocks...
- Reply-to: Adam Stein <adam at scan dot mc dot xerox dot com>
Solaris has a memalign() function which allows you to allocate memory on a
specified alignment boundary. If you are not on Solaris, your OS might also
have memalign().
Adam Stein
--
Adam Stein @ Xerox Corporation Email: adam@scan.mc.xerox.com
Disclaimer: All views expressed
here have been proved to be my own. [http://www.csh.rit.edu/~adam/]
>Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm
>List-Unsubscribe:
<mailto:gcc-help-unsubscribe-adam=scan.mc.xerox.com@gcc.gnu.org>
>List-Archive: <http://gcc.gnu.org/ml/gcc-help/>
>List-Post: <mailto:gcc-help@gcc.gnu.org>
>List-Help: <mailto:gcc-help-help@gcc.gnu.org>
>Delivered-To: mailing list gcc-help@gcc.gnu.org
>X-Authentication-Warning: CSPC201.joensuu.fi: kfredrik owned process doing -bs
>Date: Tue, 12 Aug 2003 12:02:58 +0000 (UTC)
>From: Kimmo Fredriksson <kfredrik@cs.joensuu.fi>
>X-X-Sender: kfredrik@CSPC201.joensuu.fi
>To: gcc-help@gcc.gnu.org
>Subject: mallocating 16 byte aligned blocks...
>replyto: Kimmo Fredriksson <kfredrik@cs.joensuu.fi>
>X-Spam-Status: No, hits=-5.6 required=5.0
tests=BAYES_00,USER_AGENT_PINE,X_AUTH_WARNING version=2.55-iset1
>X-Spam-Level:
>X-Spam-Checker-Version: SpamAssassin 2.55-iset1 (1.174.2.19-2003-05-19-exp)
>
>Hi,
>
>I need to malloc blocks of memory that are quaranteed to be aligned to 16
>byte boundaries. Should I write my own version of malloc, or is there a
>simpler way to achieve this?
>
>kf
>