Function | Package: windows | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version