Updated memory allocator to improve support for unaligned or partially