1. xms

Concerning the demo of Jacques Deschenes around 14 Aug 97.
Hello Jacques,
I try your code for getting information about available memory.
Here are the results on my pc and below those from Dos mem cmd.
-----
Whith Freexms.ex (so named) :
.
00h Largest available free block = 136019968 bytes
04h Maximum unlocked pages allocation = 33208 pages
08h Maximum locked pages allocation =  3253 pages
0Ch total virtual memory =  136560640
10h Total number of unlocked pages =  3259
14h Number of free pages = 3154
18h Total number of physical pages=  3274 (  13410304 bytes)
1Ch free linear address space = 33220 pages
20h size of paging file =         0 pages
-----
DOS MEM /C command :
Memory Summary:
.
  Type of Memory       Total   =    Used    +    Free
  ----------------  ----------   ----------   ----------
  Conventional         655 360       55 632      599 728
  Upper                158 640      143 216       15 424
  Reserved             393 216      393 216            0
  Extended (XMS)    15 570 000    2 542 672   13 027 328
  ----------------  ----------   ----------   ----------
  Total memory      16 777 216    3 134 736   13 642 480
.
  Total under 1 MB     814 000      198 848      615 152
.
Largest executable program size       585K (598 992 bytes)
Largest free upper memory block        14K  (14 656 bytes)
MS-DOS is resident in the high memory area.
-----
Freexms seems to display a digit to much since
I have only 13 Mb of XMS ? have I overlooked something ?
Regards,
-- Jean Hendrickx. j.hendrickx at euronet.be

new topic     » topic index » view message » categorize

2. Re: xms

At 18:35 01-09-97 +0100, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender:       Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster:       Jean Hendrickx <jean.hendrickx at EURONET.BE>
>Organization: Infoboard Belgium
>Subject:      xms
>-------------------------------------------------------------------------------
>
>Concerning the demo of Jacques Deschenes around 14 Aug 97.
>Hello Jacques,
>I try your code for getting information about available memory.
>Here are the results on my pc and below those from Dos mem cmd.
>-----
>Whith Freexms.ex (so named) :
>.
>00h Largest available free block = 136019968 bytes
>04h Maximum unlocked pages allocation = 33208 pages
>08h Maximum locked pages allocation =  3253 pages
>0Ch total virtual memory =  136560640
>10h Total number of unlocked pages =  3259
>14h Number of free pages = 3154
>18h Total number of physical pages=  3274 (  13410304 bytes)
>1Ch free linear address space = 33220 pages
>20h size of paging file =         0 pages
>-----
>DOS MEM /C command :
>Memory Summary:
>.
>  Type of Memory       Total   =    Used    +    Free
>  ----------------  ----------   ----------   ----------
>  Conventional         655 360       55 632      599 728
>  Upper                158 640      143 216       15 424
>  Reserved             393 216      393 216            0
>  Extended (XMS)    15 570 000    2 542 672   13 027 328
>  ----------------  ----------   ----------   ----------
>  Total memory      16 777 216    3 134 736   13 642 480
>.
>  Total under 1 MB     814 000      198 848      615 152
>.
>Largest executable program size       585K (598 992 bytes)
>Largest free upper memory block        14K  (14 656 bytes)
>MS-DOS is resident in the high memory area.
>-----
>Freexms seems to display a digit to much since
>I have only 13 Mb of XMS ? have I overlooked something ?
>Regards,
>-- Jean Hendrickx. j.hendrickx at euronet.be
>



  Salut Jean,

  the number at offset 00h doesn't only give real memory it give the total
memory including virtual memory.  Just in case you don't know, virtual
memory is a mechanism by which a file on hard disk is used to swap real
memory.  Intel processors support that mechanism true what Intel call
paging.  Most often (but it can be of different size)  page are 4096 bytes.
When application ask for memory, if there is not enough real memory to
answer the request the system can save a certain number of pages on hard
disk swap file.  The result of this is that many applications can share the
same real memory.  When an application want to access the part of the memory
that was allocated to it and that part of memory is not available because it
was swapped to disk an exception is generated by the processor.  Then the
exception handler (which is part of the virtual memory manager) save the
pages in memory to disk and read back the needed data (the one previouly
saved) from disk.  This is a slow process so to avoid some allocated memory
to be swapped to disk (in time critical applications) one can use
lock_memory() procedure.

 08h Maximum locked pages allocation =  3253 pages

multiply this number by 4096 and you get 3253*4096= 13 324 288 bytes  which is
the amount of real memory or xms avaible to your application becaused only real
memory can be locked ( as this term means don't swap it to disk).

  Hoping this clarify things,





Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at globetrotter.qc.ca

new topic     » goto parent     » topic index » view message » categorize

3. xms

Concerning the demo of Jacques Deschenes around 14 Aug 97.
 Hello Jacques,
 I try your code for getting information about available memory.
 Here are the results on my pc and below those from Dos mem cmd.
--SNIP---
Jacques Deschenes wrote :
> Salut Jean,
> the number at offset 00h doesn't only give real memory it give
> the total memory including virtual memory.
--SNIP---
> 08h Maximum locked pages allocation =  3253 pages
> multiply this number by 4096 and you get 3253*4096= 13 324 288 bytes
> which is the amount of real memory or xms avaible to your application
> becaused only real memory can be locked ( as this term means don't swap
> it to disk).
> Hoping this clarify things,
> Jacques Deschenes Baie-Comeau, Quebec Canada desja at globetrotter.qc.ca
Hello Jacques,
Thanks for giving me these explanations. As you saw I am unaware of
memory handlings. It's clear now.
-- Jean Hendrickx. j.hendrickx at euronet.be

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu