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