Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

Committer:
segundo
Date:
Sun Nov 07 20:31:03 2010 +0000
Revision:
4:be8247f802ad
Parent:
3:9092256004a5
Child:
5:45826003052b

        

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 0:a98bf0c96bf1 7 namespace segundo {
segundo 0:a98bf0c96bf1 8 namespace Utilities {
segundo 0:a98bf0c96bf1 9
segundo 1:d8432d8a5b6d 10 /** Return the available memory for a malloc call (to the nearest 256 bytes)
segundo 1:d8432d8a5b6d 11 */
segundo 0:a98bf0c96bf1 12 int AvailableMemory();
segundo 1:d8432d8a5b6d 13
segundo 1:d8432d8a5b6d 14 /** Return the available memory for a malloc call
segundo 1:d8432d8a5b6d 15 *
segundo 1:d8432d8a5b6d 16 * @param resolution A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 17 * @param maximum A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 18 * @param disableInterrupts A normalised number 0.0-1.0 to represent the full range.
segundo 1:d8432d8a5b6d 19 */
segundo 0:a98bf0c96bf1 20 int AvailableMemory(int resolution, int maximum, bool disableInterrupts);
segundo 0:a98bf0c96bf1 21
segundo 0:a98bf0c96bf1 22 } // namespace Utilities
segundo 0:a98bf0c96bf1 23 } // namespace segundo
segundo 0:a98bf0c96bf1 24
segundo 0:a98bf0c96bf1 25 using namespace segundo::Utilities;
segundo 0:a98bf0c96bf1 26
segundo 0:a98bf0c96bf1 27 #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H