www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/12/08:57:54

Message-ID: <01BB5845.171D3B40@psp3>
From: Steve Higgins <steve AT psp-digital DOT co DOT uk>
To: "'DJGPP Mail List'" <djgpp AT delorie DOT com>
Subject: Locking programs into memory to stop paging etc.
Date: Wed, 12 Jun 1996 09:53:49 -0000
MIME-Version: 1.0


Hi all,

I've been away from this list for some time and wondered what the latest
thoughts about locking memory for interrupts etc. was.

The last time I saw this subject discussed the following routines were
recommended.

__dpmi_meminfo MemLock::lockRegion;

void lockMem()
{
	lockRegion.address = 0x10A8;
	lockRegion.size    = (long unsigned int) (sbrk(0) - 0x10A8);

	if(__dpmi_lock_linear_region(&lockRegion) == -1)
	    printf("__dpmi_lock_linear_region Error\n");
}

void unlockMem()
{
	__dpmi_unlock_linear_region(&lockRegion);
}

What are the latest thoughts?

Will these still work with the latest versions of djgpp?


Steve.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019