1. A computer-implemented method for managing the allocation of memory comprising: activating a processing thread; allocating a first segment of a memory for the processing thread, wherein the memory includes a first region and a second region, wherein the first region includes a plurality of segments; determining if data associated with an object is to be stored in the memory; determining if the data associated with the object can be stored in a portion of the allocated first segment; allocating the portion of the first segment for storing the data associated with the object in response to the determination that the data associated with the object can be stored in the portion; storing the data associated with the object at the allocated portion of the first segment in response to the determination that the data associated with the object can be stored in the portion; and performing a garbage collection process on the allocated first segment at the end of the processing thread.