delorie.com/djgpp/doc/libc/libc_267.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

__dpmi_set_page_attributes

Syntax

 
#include <dpmi.h>

int __dpmi_set_page_attributes(__dpmi_meminfo *info, short *buffer);

Description

Please refer to the DPMI Specification (see section DPMI Specification) for details on DPMI function call operation. Also see the DPMI Overview (see section DPMI Overview) for general information.

DPMI function AX = 0x0507 (DPMI 1.0 only). Supported by CWSDPMI, but not by Windows.

This function sets attributes of a number of pages. Pass handle in info->handle, offset within block in info->address, and number of pages in info->count. buffer points to an array of 16-bit words which specify the new attributes. See section __dpmi_get_page_attributes, for the definition of the page attribute word.

The DJGPP startup code calls this function to uncommit the so-called null page, the first 4KB of the program's address space. This causes NULL pointer dereferences, a frequent programmatic error, to trigger a Page Fault exception, rather than go unnoticed.

Return Value

-1 on error, else zero.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004