Save data table in allocated memory

Rewrite get_alloc() function. Now it stores struct data in allocated memory.
Changed variable names for better code analysis
Free allocation function

Rewrite free_alloc() function for erasing struct tables from current allocation