addressing register of beagle bone black

Hello,

I am using beagle bone black.I want to address different registers of the board without creating a file operation.My confussion is if we address a gpio pin by the use of file operation that we do by writing a c program then how much time the file will be open and closed.This will lead to destroy a ram.So if any one have a solution to address different pins of the bbb by the use of any header file or so then please do post

Regards

https://github.com/VegetableAvenger/BBBIOlib.git