Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Testing

Testing is an important part of the development process. Brew developers should ensure that they include testing for fragmentation as part of their standard process.

The simplest way to check for memory fragmentation is through the GETRAMFREE() helper function. This function returns the total amount of free memory in the system heap, as well as the size of the largest free block. Applications can look at the difference between these two values to detect memory fragmentation.

The most important points at which to test for fragmentation are when the application is launched, when it is suspended, and when it is put in the background.