Mail Archives: djgpp/1996/10/31/01:49:50
In article <54se3i$ifp AT salomon DOT mchp DOT siemens DOT de>,
Ulrich Lauther <lauther AT cayley DOT zfe DOT siemens DOT de> wrote:
>
>you didn't read my question. I need it under Visual C++ (which I am *forced*
>to use).
>I cannot use malloc (at least not conveniently) as I need memory aligned to
>4096 byte boundaries.
Does Visual C++ have memalign() or valloc()? If so you could use
memalign(4096,size) or valloc(size). If worse comes to worse you can
always "#define valloc(size) ((malloc((size)+4096)+4096) & ~4095)"
I'm assuming that NT uses segments with page grandularity bases.
Eric
--
Eric Korpela | An object at rest can never be
korpela AT ssl DOT berkeley DOT edu | stopped.
<a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w">
Click here for more info.</a>
- Raw text -