🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #7714

Re: Using DPMI and XMS to get BIG memory blocks (LONG, URGENT)

#7714
From: Morris Jones
Date: Sat, 22 Dec 1990 10:20
28 lines
1859 bytes
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
Technical Details
Message-ID: <19273@netcom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!elroy.jpl.nasa.gov!ames!pacbell.com!tandem!netcom!mojo
References: <22284@well.sf.ca.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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