Function to calculate the memory available for malloc
Dependents: AvailableMemory_HelloWorld MCBBThermostat helloaabbc SP14P1_skeleton
AvailableMemory.h@9:caba868a4c1a, 2010-11-07 (annotated)
- Committer:
- segundo
- Date:
- Sun Nov 07 21:39:16 2010 +0000
- Revision:
- 9:caba868a4c1a
- Parent:
- 8:1d4f30a80292
- Child:
- 10:7474d5df69c2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
segundo | 6:e94f3a11bad7 | 1 | /** \file |
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 | 6:e94f3a11bad7 | 6 | |
segundo | 9:caba868a4c1a | 7 | /** |
segundo | 9:caba868a4c1a | 8 | * Segundo Equipo |
segundo | 9:caba868a4c1a | 9 | */ |
segundo | 0:a98bf0c96bf1 | 10 | namespace segundo { |
segundo | 9:caba868a4c1a | 11 | /** |
segundo | 9:caba868a4c1a | 12 | * A collection of utilities |
segundo | 9:caba868a4c1a | 13 | */ |
segundo | 0:a98bf0c96bf1 | 14 | namespace Utilities { |
segundo | 0:a98bf0c96bf1 | 15 | |
segundo | 7:b4a90cb19332 | 16 | /** Return the available memory for a malloc call |
segundo | 1:d8432d8a5b6d | 17 | */ |
segundo | 0:a98bf0c96bf1 | 18 | int AvailableMemory(); |
segundo | 1:d8432d8a5b6d | 19 | |
segundo | 1:d8432d8a5b6d | 20 | /** Return the available memory for a malloc call |
segundo | 8:1d4f30a80292 | 21 | * \param resolution Resolution in number of bytes |
segundo | 8:1d4f30a80292 | 22 | * \param maximum Maximum amount of memory to check |
segundo | 8:1d4f30a80292 | 23 | * \param disableInterrupts Disable interrupts whilst checking |
segundo | 1:d8432d8a5b6d | 24 | */ |
segundo | 0:a98bf0c96bf1 | 25 | int AvailableMemory(int resolution, int maximum, bool disableInterrupts); |
segundo | 0:a98bf0c96bf1 | 26 | |
segundo | 0:a98bf0c96bf1 | 27 | } // namespace Utilities |
segundo | 0:a98bf0c96bf1 | 28 | } // namespace segundo |
segundo | 0:a98bf0c96bf1 | 29 | |
segundo | 0:a98bf0c96bf1 | 30 | using namespace segundo::Utilities; |
segundo | 0:a98bf0c96bf1 | 31 | |
segundo | 0:a98bf0c96bf1 | 32 | #endif // SEGUNDO_UTILITIES_AVAILABLEMEMORY_H |