How do I properly convert a pointer (uint8_t* or void*) to a "normal" integer?
Assume the following declarations:

uint8_t* nextPointer;
uint8_t* currentPointer;
size_t currentSize;


Then the expression is valid:

size_t freeMemSize = nextPointer - currentPointer - currentSize;


If any of the pointers are void* the compiler cannot calculate the expression (pointer or size).

Cheers!