home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Homebrewer's Handbook / vr.iso / vr386 / xmem.h < prev    next >
C/C++ Source or Header  |  1996-03-19  |  2KB  |  61 lines

  1. ///// external defines of memory expander
  2. ///// only accessptr() used by renderer
  3. ///// most in rend386.h too
  4.  
  5. // MAP-EMM systemm, Copyright 26/12/93 by Dave Stampe
  6.  
  7. /*
  8.  This code is part of the VR-386 project, created by Dave Stampe.
  9.  VR-386 is a desendent of REND386, created by Dave Stampe and
  10.  Bernie Roehl.  Almost all the code has been rewritten by Dave
  11.  Stampre for VR-386.
  12.  
  13.  Copyright (c) 1994 by Dave Stampe:
  14.  May be freely used to write software for release into the public domain
  15.  or for educational use; all commercial endeavours MUST contact Dave Stampe
  16.  (dstampe@psych.toronto.edu) for permission to incorporate any part of
  17.  this software or source code into their products!  Usually there is no
  18.  charge for under 50-100 items for low-cost or shareware products, and terms
  19.  are reasonable.  Any royalties are used for development, so equipment is
  20.  often acceptable payment.
  21.  
  22.  ATTRIBUTION:  If you use any part of this source code or the libraries
  23.  in your projects, you must give attribution to VR-386 and Dave Stampe,
  24.  and any other authors in your documentation, source code, and at startup
  25.  of your program.  Let's keep the freeware ball rolling!
  26.  
  27.  DEVELOPMENT: VR-386 is a effort to develop the process started by
  28.  REND386, improving programmer access by rewriting the code and supplying
  29.  a standard API.  If you write improvements, add new functions rather
  30.  than rewriting current functions.  This will make it possible to
  31.  include you improved code in the next API release.  YOU can help advance
  32.  VR-386.  Comments on the API are welcome.
  33.  
  34.  CONTACT: dstampe@psych.toronto.edu
  35. */
  36.  
  37.  
  38.  
  39.  
  40. extern int EMM_active;        // set if EMM is turned on
  41.  
  42. extern long alloccount;       // counts successful calls to extmalloc <DEBUG>
  43.  
  44. int initEMMalloc(long wanted);    // inits system arg is desired pages
  45.                 // returns actual pages available
  46.  
  47. void resetEMMalloc();       // release EMM memory
  48.  
  49. void *extmalloc(long n);    // use this in programs
  50.  
  51. void extfree(void *p);  // free ext. mem
  52.  
  53. void restoreEMM();      // call this if you screw around with EMM mapping
  54.  
  55. int accessptr(void *p); // check that pointer's data is mapped in
  56.  
  57. long EMMheapsize();    // EMM left
  58.  
  59. long EMMheapused();    // EMM used so far
  60.  
  61.