File: al_get_ram_size.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (38 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.TH "al_get_ram_size" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_get_ram_size \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

int\ al_get_ram_size(void)
\f[]
.fi
.SH DESCRIPTION
.PP
Returns the size in MB of the random access memory that the system
Allegro is running on has and which could be detected, or a negative
number if detection failed.
Even if a positive number is returned, it might be that it is not
correct.
For example, Allegro running on a virtual machine will return the amount
of RAM of the VM, and not that of the underlying system.
.PP
Furthermore even if the number is correct, this only gives you
information about the total physical memory of the system Allegro runs
on.
The memory available to your program may be less or more than what this
function returns due to circumstances such as virtual memory, and other
programs that are currently running.
.PP
Therefore, it\[aq]s best to use this for advisory purposes only.
It is certainly a bad idea to make your program exclusive to systems for
which this function returns a certain "desirable" number.
.PP
This function may be called prior to al_install_system(3) or al_init(3).
.SH SINCE
.PP
5.1.12