fix allocated memory size