mem alignment and padding