Skip to content
Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › Operating System Functions › Fre

Fre

Returns the amount of free physical memory, in bytes.

Syntax

Declare Function Fre ( ByVal value As Long = 0 ) As UInteger

Parameters

  • value

Description

Returns the free memory (ram) available, in bytes.

Return Value

Returns the amount of free memory, in bytes.

Remarks

Usage

result = Fre( [ value ] )

Differences from QB

  • The "value" argument is not checked, Fre will always return the free physical memory available

See also

Examples

Dim mem As UInteger = Fre

Print "Free memory:"

Print

Print mem; " bytes"

Print mem  \ 1024; " kilobytes"

Print mem  \ (1024 * 1024); " megabytes"

Category: Operating System Functions
Kind: function


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally