#include <AutomatedGC.h>
Inheritance diagram for clawsoft::AutomatedGC:
It will do the checking every _scanperiod milliseconds
Public Types | |
enum | SchedPolicy { NORMAL, ROUND_ROBIN, FIFO } |
Public Methods | |
AutomatedGC (Uint32 speriod) | |
This is the default constructor, it will initialize the poll time to speriod milliseconds. | |
void | startChecking () |
Calls this function to enable the garbage scanning process. | |
void * | run () |
This is the overriden version of Thread::run PLEASE DONT CALL THIS FUNCTION DIRECTLY. | |
void | stop () |
This will stop forever the garbage collecting process. | |
void | add (TemporalBuffer *a) |
Add a new memory object to be collected. | |
const char * | getClassName () |
Returns the name of the current class. | |
int | start () |
Call this method when you want to start running your thread. | |
void | killMe () |
This method detaches the thread from the current running program, just like detach() does. | |
bool | isRunning () |
Use this method to verify if your thread is running;. | |
void | setSchedulingPolicy (SchedPolicy pol=NORMAL) |
This method will set the scheduling policy for the current thread, there are two types scheduling policies: * Realtime * Non-realtime Realtime policies are the ROUND_ROBIN and FIFO Non-realime is called NORMAL. | |
void | setPriority (int prio) |
Use this method to set the priority for the current scheduling policy. | |
const char * | getClassName () |
Returns the name of the current class. | |
Static Public Methods | |
int | installedCPUs () |
This will return how many CPUs are installed in the system. | |
double | cpuSpeed () |
This will return the CPU speed in megahertz. | |
int | totalMemory () |
Will return the total amount of system memory. | |
int | freeMemory () |
Will return the total amount of free system memory. | |
void | usleep (Uint32 usec) |
Will freeze the software for usec microseconds. | |
int | installedCPUs () |
This will return how many CPUs are installed in the system. | |
double | cpuSpeed () |
This will return the CPU speed in megahertz. | |
int | totalMemory () |
Will return the total amount of system memory. | |
int | freeMemory () |
Will return the total amount of free system memory. | |
void | usleep (Uint32 usec) |
Will freeze the software for usec microseconds. | |
Data Fields | |
bool | autodetach |
This variable is just for knowing if the thread can be autodetached or no, currently it does nothing, but is here for backward compatibility. | |
Protected Methods | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. | |
int | _start () |
This is a wrapper and is intended to be used only for derived classes. | |
void | detach () |
This method detaches the thread from the current running program. | |
void | setClassName (const char *n) |
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging. | |
Protected Attributes | |
Uint32 | _scanperiod |
The time in milliseconds for polling the garbage list. | |
bool | keepscanning |
This will determine wheter the main garbage scanning loop should continue or not. | |
List< TemporalBuffer * > * | garbage |
This list holds the temporarybuffer objects to be collected when they reach their maximum time to live. |
|
|
|
This is the default constructor, it will initialize the poll time to speriod milliseconds.
|
|
This is a wrapper and is intended to be used only for derived classes.
|
|
Add a new memory object to be collected.
|
|
This will return the CPU speed in megahertz.
|
|
This will return the CPU speed in megahertz.
|
|
This method detaches the thread from the current running program.
|
|
Will return the total amount of free system memory.
|
|
Will return the total amount of free system memory.
|
|
Returns the name of the current class.
|
|
Returns the name of the current class.
|
|
This will return how many CPUs are installed in the system.
|
|
This will return how many CPUs are installed in the system.
|
|
Use this method to verify if your thread is running;.
|
|
This method detaches the thread from the current running program, just like detach() does.
|
|
This is the overriden version of Thread::run PLEASE DONT CALL THIS FUNCTION DIRECTLY.
Implements clawsoft::Thread. |
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
|
Call this method when you need to set the name of the class you're creating, typically in it's constructor, remember that you must set the classname for every class you create, that way you can have more information while debugging.
|
|
Use this method to set the priority for the current scheduling policy.
|
|
This method will set the scheduling policy for the current thread, there are two types scheduling policies: * Realtime * Non-realtime Realtime policies are the ROUND_ROBIN and FIFO Non-realime is called NORMAL.
|
|
Call this method when you want to start running your thread.
|
|
Calls this function to enable the garbage scanning process.
|
|
This will stop forever the garbage collecting process.
|
|
Will return the total amount of system memory.
|
|
Will return the total amount of system memory.
|
|
Will freeze the software for usec microseconds.
|
|
Will freeze the software for usec microseconds.
|
|
The time in milliseconds for polling the garbage list.
|
|
This variable is just for knowing if the thread can be autodetached or no, currently it does nothing, but is here for backward compatibility.
|
|
This list holds the temporarybuffer objects to be collected when they reach their maximum time to live.
|
|
This will determine wheter the main garbage scanning loop should continue or not.
|
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: