Article View: comp.os.os2.programmer
Article #2230Re: Allocating a 64k chunk in a device driver...
From: John Freeborg
Date: Thu, 01 Oct 1992 14:33
Date: Thu, 01 Oct 1992 14:33
26 lines
1453 bytes
1453 bytes
In article <1992Sep29.070357.23292@CS.ORST.EDU> @prism.cs.orst.edu writes: >I need to allocate two 64k buffers in ram from a 16bit device driver. Each of >the buffers must be completely contained in a segment. They cannot cross a >segment boundary. Does anyone know of a way to do this? > >Thanks > >Keith I've never actually done it, but I'm studying the PDD reference right now for a similar idea. From what I can make of it you could do the following DevHlp calls: VMAlloc() to allocate the 64 Kb chunk VMLock() to fix the 64 Kb chunk in memory LinToGDTSelector() to convert the 32-bit linear address to a selector I think that is all you need, just do this twice to get 2 64 Kb chunks. Note that 64 Kb is the limit for the LinToGDTSelector() call so you are ok. - John ------------------------------------------------------------------------------- John Freeborg Software Engineer Persoft johnf@persoft.com 465 Science Dr. 608-273-6000 Madison, WI 53711
Technical Details
Message-ID:
<1992Oct1.143328.20361@persoft.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!uwvax!persoft!johnfReferences:
<1992Sep29.070357.23292@CS.ORST.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!uwvax!persoft!johnf From: johnf@persoft.com (John Freeborg) Newsgroups: comp.os.os2.programmer Subject: Re: Allocating a 64k chunk in a device driver... Message-ID: <1992Oct1.143328.20361@persoft.com> Date: 1 Oct 92 14:33:28 GMT References: <1992Sep29.070357.23292@CS.ORST.EDU> Organization: Persoft, Inc. Lines: 26