FunctionPackage: windowsToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Moderately revised from 10.0.
10.0 version

memory-status

Arguments: nil

Returns a property list that contains statistics about the real and virtual memory of the computer. This function is a thin layer on the Microsoft function GlobalMemoryStatusEx, and is therefore available only on the Windows platform. It is in the :windows module, which is always present in the IDE, and which can be loaded with the form (require :windows) in a base Lisp.

For more information, look up the MEMORYSTATUSEX structure on Microsoft's developer web site http://msdn.com. Here is how the keys of the property list that is returned by memory-status map to the Microsoft structure:

Property List Key         MEMORYSTATUSEX Slot

:total-physical           dwTotalPhys
:available-physical       dwAvailPhys
:total-paging             dwTotalPageFile
:available-paging         dwAvailPageFile
:total-addressable        dwTotalVirtual
:available-addressable    dwAvailVirtual
:load                     dwMemoryLoad

In addition, the property list includes a :percent-used key, whose value is computed by the following formula (partly to round the value to two decimal places):

(- 100 (/ (round (* 100 (/ (* 100.0 (+ dwAvailPhys dwAvailPageFile))
                           (+ dwTotalPhys dwTotalPageFile))))
          100.0))

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Moderately revised from 10.0.
10.0 version