Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!elroy.jpl.nasa.gov!ames!pacbell.com!tandem!netcom!mojo From: mojo@netcom.UUCP (Morris Jones) Newsgroups: comp.windows.ms Subject: Re: Using DPMI and XMS to get BIG memory blocks (LONG, URGENT) Keywords: xms dpmi dma windows memory Message-ID: <19273@netcom.UUCP> Date: 22 Dec 90 10:20:22 GMT References: <22284@well.sf.ca.us> Distribution: comp Organization: Netcom- The Bay Area's Public Access Unix System {408 241-9760 guest} Lines: 28 brent@well.sf.ca.us (Brent Southard) writes: > Well, I tried to allocate that 2MB block using the >Allocate Extended Memory Block function (09h), and got back an error, BL==A0, >which implies that ALL extended memory is allocated. Huh? I tried halving my >request, and it succeeded. What gives? Brent, it's possible that Windows won't allocate more than a meg of 16-bit memory because of limits involving 16-bit pointer arithmetic and selectors. So here's an alternative: Look at Appendix E of the SDK. Use the 32-bit memory allocation functions. I have succesfully allocated much larger chunks of memory using the Global32Alloc() function. You can refer to the memory with 16-bit pointers if you need to by getting a 16-bit alias with Global16PointerAlloc(). As far as insuring that the memory is contiguous and page locked ... ... I'm afraid you're on your own. But if you find a way to do it, I'd certainly like to hear about it. Mojo Caere Corp. netcom!mojo@apple.com -- mojo@netcom.UUCP Site Coordinating Instructor, San Jose South Morris "Mojo" Jones Skilled Motorcycling And Rider Training (S.M.A.R.T.) Campbell, CA 800-675-5559 ... 800-CC-RIDER ... 408-423-2212 AA4KB @ N6LDL.#NOCAL.CA.USA.NA / aa4kb.ampr.org / netcom!mojo@apple.com