Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

Committer:
segundo
Date:
Sun Nov 07 19:22:33 2010 +0000
Revision:
1:d8432d8a5b6d
Parent:
0:a98bf0c96bf1
Child:
2:5dd69c9259a0

        

Who changed what in which revision?

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