Allocates size bytes, and return a pointer on the allocated memory. A Lua error will be generated if running out of memory.