Chapter 3 Terminal Specific Function Library
213
3.15.2 SRAM
The File System keeps user data in SRAM, which is maintained by the backup battery.
However, data loss may occur during low battery condition or when the battery is drained. It
is necessary to upload data to a host computer before putting away the terminal.
free_memory
Purpose
To get the size of free memory in SRAM.
Syntax
long free_memory (void);
Example
available_memory = free_memory();
Description
This routine gets the amount of free (unused) memory of the file space.
Return
This routine returns the size of the free memory in byte.
See Also
RamSize
init_free_memory
Purpose
To initialize the file space in SRAM.
Syntax
void init_free_memory (void);
Example
init_free_memory();
Description
This routine first tries to identify how many SRAM cards are installed, and
then initialize the overall file space (total SRAMs deducts memory of system
space and user space).
The original contents of the file space will be wiped out after calling this
routine. Whenever the amount of the SRAMs installed is changed, this routine
must be called to recognize such change.
Return
None
See Also
free_memory
RamSize
Purpose
To get the size of data memory (SRAM).
Syntax
int RamSize (void);
Example
RamSize();
Description
This routine gets the size of data memory, which is available to data files.
Return
This routine returns the size of SRAM in kilobyte.
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...