FRE
FRE (x)
Returns system memory information. eg, 0 = free memory. If a value is
not supported by the operating system, fre
will return 0.
fre()
without a parameter returns the free physical
memory.
Windows
x | Description |
---|---|
0 | free memory |
-1 | largest block of integers |
-2 | free stack |
-3 | largest free block |
-12 | free memory same as 0 |
LINUX and ANDROID
x | Description |
---|---|
0 | free memory |
-10 | total physical memory |
-11 | used physical memory |
-12 | free physical memory same as 0 |
Alternative for LINUX with kernel > 3.x and ANDROID
fre
can be used to read the values of the file
/proc/meminfo
. In a console please type
cat /proc/meminfo
. Output should look similar to this (but
more lines):
3630512 kB
MemTotal: 117204 kB
MemFree: 601308 kB
MemAvailable: 52680 kB
Buffers: 1002608 kB
Cached: 58640 kB
SwapCached: 857224 kB
Active: 1781244 kB Inactive:
To querry with fre
the value of the first line, use
fre(0)
, for second line fre(1)
, and so on.
Example
print "Free memory: "; fre()
print "Total RAM: "; fre(-10)
print "Used RAM: "; fre(-11)
print "Free RAM: "; fre(-12)
Code samples using FRE
7gables.bas
agendus.bas
ai.bas
base64.bas
bonkers.bas
checkers.bas
checkers.bas
chess.bas
chess.bas
circles Kalide v2.bas
clock.bas
coordplot.bas
dmsareaplot.bas
dmsareareadmd.bas
dogstar5.bas
driven_mass_and_spring.bas
filemanager.bas
form demo.bas
frehand.bas
g2 Life.bas
g3 Life.bas
g4 Life.bas
g5 Life.bas
g6 Life.bas
galgenmann.bas
gridareaplot.bas
GUI RPSLS v2.bas
hangman v2.bas
hangman.bas
System
CHAIN
COMMAND
CWD
DELAY
ENV
ENV
EXEC
EXPORT
FRE
HOME
IMPORT
INCLUDE
MAXINT
NIL
OPTION
PAUSE
PI
PROGLINE
RANDOMIZE
RUN
SBVER
SELF
STKDUMP
TROFF
TRON
UNIT
If there is insufficient information on this page and you wish learn more about FRE,
please send an email to smallbasic@gmail.com. You can help to improve information about
FRE by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.