Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

Committer:
segundo
Date:
Sun Nov 07 20:00:21 2010 +0000
Revision:
3:9092256004a5
Parent:
2:5dd69c9259a0
Child:
4:be8247f802ad

        

Who changed what in which revision?

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