Function to calculate the memory available for malloc

Dependents:   AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton

AvailableMemory.h

Committer:
segundo
Date:
2010-11-07
Revision:
8:1d4f30a80292
Parent:
7:b4a90cb19332
Child:
9:caba868a4c1a

File content as of revision 8:1d4f30a80292:

/** \file
 * Return the available memory for a malloc call
 */
#ifndef SEGUNDO_UTILITIES_AVAILABLEMEMORY_H
#define SEGUNDO_UTILITIES_AVAILABLEMEMORY_H

namespace segundo {
namespace Utilities {

/** Return the available memory for a malloc call
 */
int AvailableMemory();

/** Return the available memory for a malloc call
 * \param resolution Resolution in number of bytes
 * \param maximum Maximum amount of memory to check
 * \param disableInterrupts Disable interrupts whilst checking
 */
int AvailableMemory(int resolution, int maximum, bool disableInterrupts);

} // namespace Utilities
} // namespace segundo

using namespace segundo::Utilities;

#endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H