1. A memory management method comprising: requesting, at a first module corresponding to codes written in a first programming language, a second module corresponding to codes written in a second programming language for memory allocation; and allocating, at the second module, a target memory portion in response to the request for memory allocation, and returning reference data indicating the allocated target memory portion to the first module, wherein the first programming language is a programming language that carries out garbage collection in a case of memory allocation, and the second programming language is a programming language that does not carry out garbage collection in the case of memory allocation.