Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!swrinde!ucsd!network.ucsd.edu!euclid.ucsd.edu!athing From: athing@euclid.ucsd.edu (Bill Athing) Newsgroups: comp.windows.ms Subject: Memory Allocation/GlobalAlloc Message-ID: <3935@network.ucsd.edu> Date: 25 Oct 90 07:32:12 GMT Sender: news@network.ucsd.edu Reply-To: athing@euclid.ucsd.edu (Bill Athing) Organization: none Lines: 17 Nntp-Posting-Host: euclid.ucsd.edu I am trying to allocate several buffers under MS windows that must be aligned on 64k page boundries for purposes of DMA transfer. I have a kludge solution right now, where if I want a 64k buffer, I request a 128k buffer and use only half of it. This is, needless to say, wasteful, and obnoxious in terms of proper behaviour in a cooperative multitasking environment. Is there a better way to achieve the same results? Can I be guaranteed that if I take a large chunk from global alloc, find the start address, free up that block, allocate enough so that the next GlobalAlloc call will give me the alignment I need, then free up the block I used to force the third call to be DMA page aligned? There's got to be a better way. Thanks for your help, Bill Athing