fixed LIN mem alloc when using it multible time

sys and APPLICATION arear as not seperated yet todo