there is a similar thing on mac to Defragging now that it has a UNIX base. the File System Checker (fsck) will find and fix any corrupted files.
Hold down Command+s when starting up your mac. this will boot you into single user mode. once you see the command prompt (#), type the following:
fsck -y
hit enter, and it will run the file system checker. youll see some lines of text, if finishes and you see this:
***** FILE SYSTEM WAS MODIFIED *****
then you should run the file system checker again using the same command above. if it finishes and reports no error, then you can continue to os x by typing
reboot (to restart)
or logout (to boot up staright to os x)
you can also try resetting your Parameter Random Access Memory (PRAM). its good to reset this once every many moons. you can do this by holding down command+option+p+r on startup. continue to hold it down until you hear it chime again. (i usually let it chime 3 or 4 times before letting go). Afterwards, just let go of the keys and it will boot up normally.