add page alloctor
modified c code style