Explicitly request garbage collection, reclaiming unused memory of this process.
Obtain device specific information. With one argument, returns the value of attribute number index. With two arguments, sets the the value of attribute number index, and returns the old value.
Throws ErrNotSupported if the attribute cannot be read (or modified).
Please refer to Symbian OS documentation for a complete list of attributes. The following table just lists a few:
| Index | Meaning |
| 5 | Machine UID |
| 11 | CPU frequency in kHz |
| 31 | Display width in pixels |
| 32 | Display height in pixels |
| 35 | Display colors |
| 68 | System language: 1=english, 2=french, 3=german, ... |
| 72 | System drive: 0=A:, 1=B:, 2=C:, ... |
| ||||||
Without argument, returns the current key lock state of the phone: true, if the key lock is enabled, false otherwise.
With one argument, return the current key lock state, and sets the new state: with locked=true, the phones key lock is set on, with locked=false the key lock is cancelled.
The first form returns the size of memory for data used by m, and all its processes. This includes the 60 to 100 kBytes of application memory.
The second form returns the size of memory allocated to expression, or what would be reclaimed if expression were no longer used. If expression is an array or a class instance, this includes the memory allocated to all elements and fields of the array, recursively.
|
print system.mem() → 91984
system.gc(); // collect all garbageprint system.mem(array.create(40, 40, 0)) → 13964
print system.gc() // reclaim array→ 13956
|
| ||||||||
Reboots the phone, i.e. restarts it without prompting for the SIM PIN. Note that this function should only be used to reset the phone into a safe state when it stops working properly.
| ||||||
Shuts the phone down, i.e. turns it off.
|
// turn the phone off if it has been idle // longer than an hour while true do if ui.idletime() > 3600 * 1000 then system.shutdown() end; sleep(600 * 1000) // wait for ten minutes end |
Gets and sets the verbosity level of garbage collection:
| 0 | Garbage collection works silently. This is the default. |
| 1 | Whenever garbage collection occurs, a short message with the size of the space reclaimed is printed on the console. |
| 2 | Whenever garbage collection occurs, a long message with the size and number of cells of the space in use and the space reclaimed is printed, together with the total data memory in use by m. |
|
system.verbosegc(2); for i=1 to 5 do a=array.create(100, 100, 0) end; → GC: used=81K/104, freed=0K/0, total=133K
GC: used=162K/205, freed=0K/0, total=214K GC: used=162K/205, freed=81K/202, total=214K GC: used=162K/205, freed=81K/202, total=214K GC:&nbs |
• const caps = basic | extended | certified | all
The capabilities granted to this process by the operating system's security platform. Most m functions and constants require only basic capabilities. The exceptions are marked accordingly. See section * (Reference) for details about capabilities under Symbian OS.
• const dev = Device (version)
The device type and, in parentheses, the manufacturer software version. If the device name is just a hexadecimal number (e.g. 0x101fb2ae), please add a bug report citing this number and indicating the device type.
• const docdir = c:\documents\mShell\| c:\Media files\document\mShell\
The directory where the current m script (or executable) is stored.
• const mdir = c:\system\apps\mShell\| c:\resource\apps\mShell\
The directory where the m resource files are stored.
• const os = Symbian | Symbian 3rd
The operating system of the device.
• const platform = S60 | UIQ
The (Symbian) platform of the device.