This piece of code is Windows only:
function MemoryUsed: cardinal; inline;
Result := MMS.TotalAllocatedMediumBlockSize + MMS.TotalAllocatedLargeBlockSize;
for Block in MMS.SmallBlockTypeStates
do Result := Result + (Block.UseableBlockSize * Block.AllocatedBlockCount);
Is there something that is available on other platforms (POSIX) that can give me an idea of how much memory the app is using, without calling native OS functions?