memory usage.

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how to find the RAM memory usage in runtime while executing any application in any device

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nasty solution:

int freeMem = 0;
const int resolution = 200;
do
{
	void *ptr = malloc(freeMem + resolution);
	if(ptr == NULL)
	{
		break;
	}
	else
	{
		freeMem += resolution;
		free(ptr);
	}
} while(1);