Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

Committer:
segundo
Date:
Sun Nov 07 20:44:15 2010 +0000
Revision:
5:45826003052b
Parent:
4:be8247f802ad
Child:
6:e94f3a11bad7

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
segundo 3:9092256004a5 1 /** @file AvailableMemory.h
segundo 4:be8247f802ad 2 * Return the available memory for a malloc call
segundo 3:9092256004a5 3 */
segundo 0:a98bf0c96bf1 4 #ifndef SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
segundo 0:a98bf0c96bf1 5 #define SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
segundo 3:9092256004a5 6
segundo 5:45826003052b 7 /** @fn const char *Test::member(char c,int n)
segundo 5:45826003052b 8 * @brief A member function.
segundo 5:45826003052b 9 * @param c a character.
segundo 5:45826003052b 10 * @param n an integer.
segundo 5:45826003052b 11 * @exception std::out_of_range parameter is out of range.
segundo 5:45826003052b 12 * @return a character pointer.
segundo 5:45826003052b 13 */
segundo 5:45826003052b 14
segundo 0:a98bf0c96bf1 15 namespace segundo {
segundo 0:a98bf0c96bf1 16 namespace Utilities {
segundo 0:a98bf0c96bf1 17
segundo 1:d8432d8a5b6d 18 /** Return the available memory for a malloc call (to the nearest 256 bytes)
segundo 1:d8432d8a5b6d 19 */
segundo 0:a98bf0c96bf1 20 int AvailableMemory();
segundo 1:d8432d8a5b6d 21
segundo 1:d8432d8a5b6d 22 /** Return the available memory for a malloc call
segundo 1:d8432d8a5b6d 23 *
segundo 1:d8432d8a5b6d 24 * @param resolution A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 25 * @param maximum A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 26 * @param disableInterrupts A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 27 */
segundo 0:a98bf0c96bf1 28 int AvailableMemory(int resolution, int maximum, bool disableInterrupts);
segundo 0:a98bf0c96bf1 29
segundo 0:a98bf0c96bf1 30 } // namespace Utilities
segundo 0:a98bf0c96bf1 31 } // namespace segundo
segundo 0:a98bf0c96bf1 32
segundo 0:a98bf0c96bf1 33 using namespace segundo::Utilities;
segundo 0:a98bf0c96bf1 34
segundo 0:a98bf0c96bf1 35 #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H