From: korpela AT islay DOT ssl DOT berkeley DOT edu (Eric J. Korpela) Newsgroups: comp.os.msdos.djgpp Subject: Re: sbrk ? Date: 30 Oct 1996 19:25:38 GMT Organization: Cal Berkeley-- Space Sciences Lab Lines: 20 Message-ID: <558a3i$kaf@agate.berkeley.edu> References: <54qkhh$j8h AT salomon DOT mchp DOT siemens DOT de> <54s77r$phg AT sun-cc204 DOT lboro DOT ac DOT uk> <54se3i$ifp AT salomon DOT mchp DOT siemens DOT de> NNTP-Posting-Host: islay.ssl.berkeley.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <54se3i$ifp AT salomon DOT mchp DOT siemens DOT de>, Ulrich Lauther 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. Click here for more info.