Used Memory

hi !
im trying to check the memory used by my program.
is there a way to ask about the free (physical) memory of the system ??
(that way i can calculate it at the beginning and at the end of my program)

thanks in advance !
peace !
Ram Cohen

is there a way to ask about the free (physical) memory of the system ??

ls -dl /proc

Poseidon