[comp.windows.ms.programmer] Allocating Fixed Memory

rc20@prism.gatech.EDU (CAREY,RICHARD A.) (03/09/91)

Can anyone tell me where I can get some information on locking memory at a
fixed address.

I have tried SDK documentation and Peter Norton & Paul Yao book with no luck.
I have also tried Microsoft but have no been able to talk to anyone there who 
knew the answer.

Do I need to purchase the Device Driver Development Kit ?  Does anyone have
any info on the DDD kit ?

Any help will be greatly appreciated.

Thanks in advance.



--------------------------------------------------------------------------------
Richard Carey                 | 
Ga. Tech Research Inst.       | "It is better to remain silent and be thought a
PHONE:(404) 894-3412          |  fool, than to speak and remove all doubt"
EMAIL:rc20@hydra.gatech.edu   |                       Anonymous.
--------------------------------------------------------------------------------



-- 
CAREY,RICHARD A.
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!rc20
Internet: rc20@prism.gatech.edu

gpsteffl@sunee.waterloo.edu (Glenn Patrick Steffler) (03/13/91)

In article <23883@hydra.gatech.EDU> rc20@prism.gatech.EDU (CAREY,RICHARD A.) writes:
>
>Can anyone tell me where I can get some information on locking memory at a
>fixed address.

GlobalDOSAlloc() is fixed, non-pageable memory.  Just allocating a block, and
calling GlobalLock() will not lock the memory physically, just logically.

GlobalDOSAlloc () is to be used to pass data to DOS TSR's or provide
buffers for real mode device drivers.  Please use this sparingly.

The only other 'fixed' memory are fixed code segment DLL's.  All other
memory is assumed to be pageable (unless page locked) and moveable
logically...ie...selector doesn't change, but memory address pointed to
by the selector may.`

>CAREY,RICHARD A.
>Georgia Institute of Technology, Atlanta Georgia, 30332
>uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!rc20
>Internet: rc20@prism.gatech.edu

-- 
Co-Op Scum                            "Bo doesn't know software" - George Brett

"The galaxial hearth steams the sea as the sky blood red embrasses darkness"
-John Constantine (HellBlazer)                          Glenn Steffler

petey@bjcong.bj.co.uk (PETE YOXALL) (03/20/91)

In article <1991Mar12.183751.26640@sunee.waterloo.edu> gpsteffl@sunee.waterloo.edu (Glenn Patrick Steffler) writes:
>
>GlobalDOSAlloc () is to be used to pass data to DOS TSR's or provide
>buffers for real mode device drivers.  Please use this sparingly.
>
It may be worth adding that this type of buffer only exists in the Windows
virtual machine. If a VM switch occurs (e.g a DOS shell gets a timeslice),
a TSR that had remembered the buffer address and tried to use it (maybe because
a h/w interrupt occurs) would scribble where it shouldn't or read garbage.

-- 
Peter Yoxall                      : email   : petey@boldon-james-limited.co.uk
Boldon James Ltd, Congleton, UK   : phone   : +44 260 280465