Expanded/Extended memory use in MSC 5.1

Allan Watkins arw at stiatl.UUCP
Wed Jan 17 03:10:35 AEST 1990


   Did you ever browse the news at work, learn a few things and then forget
  what you really learned?  Well, I have just been presented a problem with
  memory allocation in Microsoft C 5.1 which I am kind of new to but have
  read about it here before.
   We are currently using the Huge memory model for our very large application
  and have already overcome the memory fragmentation existing in MSC 5.1.  What
  we'd like to do is to use as much of the expanded memory as possible and even
  the extended memory but I don't understand a few things.  Two requirements 
  pertaining to the following questions is that any solutions will need to be
  portable to a large number of (if not all) PC's and that we would like to not 
  have to install (or use) an outside packages to solve the problem.  We would
  also like to not have to write assembly code although we will if that is the
  only way.
   1) Is it true (and impassible) that MSC cannot allocate memory into the 
       expanded/extended range?
   2) From a friend of mine I was told the following blocks are usused by DOS
       and therefore should be available to an application program.
               C0000 - C7FFF  = 32k
               D0000 - EFFFF  = 128k
       Is it possible or safe to just start using this memory by declaring a
       far pointer at a particular position and going to town? Is there any
       way to tell MSC to allocate memory from those ranges, or add them into
       the heap by pointers (I'm really reaching, I know)? 
       I also read in the Advanced MS-DOS book the interrupt 67H along with
       EMM (Expanded Memory Manager) can provide access to the expanded memory.
       Would this interrupt interfere with MSC's handling of the heap?  Would
       the best solution be to write our own heap manager and bag the MSC
       stuff?  I'd be very interested in finding out what other companies have
       done to solve this problem.
   3) What is the difference between "real" and "protected" mode when dealing
       with extended memory?  What does an application/program lose or have to
       deal with when the computer goes from real to protected mode?
   4) WHEN IS SOMEONE GONNA MAKE IT EASY TO USE EXPANDED AND EXTENDED MEMORY
       IN NORMAL MSC C LANGUAGE? (no violins please).
   
   As a side note (whether it makes a difference or not), all of the displays 
    in our application are in standard extended ASCII codes, no graphics that
    I know of.

       Any and all comments are eagerly awaited. Thank you.



More information about the Comp.lang.c mailing list