Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

Committer:
segundo
Date:
Sun Nov 07 19:41:47 2010 +0000
Revision:
2:5dd69c9259a0
Parent:
1:d8432d8a5b6d
Child:
3:9092256004a5

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
segundo 2:5dd69c9259a0 1 /** @file */
segundo 0:a98bf0c96bf1 2 #ifndef SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
segundo 0:a98bf0c96bf1 3 #define SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
segundo 0:a98bf0c96bf1 4
segundo 0:a98bf0c96bf1 5 namespace segundo {
segundo 0:a98bf0c96bf1 6 namespace Utilities {
segundo 0:a98bf0c96bf1 7
segundo 1:d8432d8a5b6d 8 /** Return the available memory for a malloc call (to the nearest 256 bytes)
segundo 1:d8432d8a5b6d 9 */
segundo 0:a98bf0c96bf1 10 int AvailableMemory();
segundo 1:d8432d8a5b6d 11
segundo 1:d8432d8a5b6d 12 /** Return the available memory for a malloc call
segundo 1:d8432d8a5b6d 13 *
segundo 1:d8432d8a5b6d 14 * @param resolution A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 15 * @param maximum A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 16 * @param disableInterrupts A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 17 */
segundo 0:a98bf0c96bf1 18 int AvailableMemory(int resolution, int maximum, bool disableInterrupts);
segundo 0:a98bf0c96bf1 19
segundo 0:a98bf0c96bf1 20 } // namespace Utilities
segundo 0:a98bf0c96bf1 21 } // namespace segundo
segundo 0:a98bf0c96bf1 22
segundo 0:a98bf0c96bf1 23 using namespace segundo::Utilities;
segundo 0:a98bf0c96bf1 24
segundo 0:a98bf0c96bf1 25 #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H