An apparatus for automatic memory management for parallel computing of a web application, said apparatus comprising: a processor having at least two computer processing unit, CPU, cores; an operating system configured to assign one or more threads of a processing function of a web application to corresponding CPU cores of said processor for concurrent execution on said corresponding CPU cores, said one or more threads comprise a first thread and at least one spawned thread; memory having a set of blocks distributed to said first thread and said at least one spawned thread, said memory being partitioned into a nursery heap, a mature heap and a database having a plurality of private nurseries; wherein said first thread has access to said nursery heap and mature heap, said first thread being configured to allocate and manipulate one or more objects in said nursery heap and write references to one or more objects stored in said nursery and mature heaps; and wherein said at least one spawned thread has access to an associated one of said plurality of private nurseries, said at least one spawned thread being configured to allocate and manipulate one or more objects within said associated private nursery; characterised in that: wherein, if said associated one of said plurality of private nurseries has insufficient memory space for said at least one spawned thread to complete allocation of one or more objects, said at least one spawned thread is configured to: acquire access to an additional empty private nursery from said plurality of private nurseries, if available; and when said empty private nursery is not available, acquire access to only an unused portion of memory space of a partially used private nursery of a spawned thread that has completed execution from said plurality of private nurseries to allocate one or more objects. a processor having at least two computer processing unit, CPU, cores; an operating system configured to assign one or more threads of a processing function of a web application to corresponding CPU cores of said processor for concurrent execution on said corresponding CPU cores, said one or more threads comprise a first thread and at least one spawned thread; memory having a set of blocks distributed to said first thread and said at least one spawned thread, said memory being partitioned into a nursery heap, a mature heap and a database having a plurality of private nurseries; wherein said first thread has access to said nursery heap and mature heap, said first thread being configured to allocate and manipulate one or more objects in said nursery heap and write references to one or more objects stored in said nursery and mature heaps; and wherein said at least one spawned thread has access to an associated one of said plurality of private nurseries, said at least one spawned thread being configured to allocate and manipulate one or more objects within said associated private nursery; wherein, if said associated one of said plurality of private nurseries has insufficient memory space for said at least one spawned thread to complete allocation of one or more objects, said at least one spawned thread is configured to: acquire access to an additional empty private nursery from said plurality of private nurseries, if available; and when said empty private nursery is not available, acquire access to only an unused portion of memory space of a partially used private nursery of a spawned thread that has completed execution from said plurality of private nurseries to allocate one or more objects. acquire access to an additional empty private nursery from said plurality of private nurseries, if available; and when said empty private nursery is not available, acquire access to only an unused portion of memory space of a partially used private nursery of a spawned thread that has completed execution from said plurality of private nurseries to allocate one or more objects.