athing@euclid.ucsd.edu (Bill Athing) (10/25/90)
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