A method performed at a hardware processor of a mobile device, the method comprising: configuring, a plurality of process classes (142, 144, 146), comprising associating each of the process classes with a template process (112, 114, 116) among a plurality of template processes and associating each template process, of the plurality of template processes, with a different randomized memory layout among a plurality of randomized memory layouts, at least one of said randomized memory layouts being associated with a plurality of applications in the same template process; receiving, a launching request for an application (122, 124, 126); in response to the receiving the launching request, determining a process class that is associated with the application (122, 124, 146); in response to the determining, launching the application through a forked template process associated with the determined process class, wherein other different forked template processes from the plurality of template processes are running on the mobile device; determining a number of applications that have been launched by the forked template process associated with the determined process class; determining that the number of applications that have been launched by the determined forked template process meets a threshold; and in response to determining that the number of applications that have been launched by the forked template process meets the threshold: starting a delay timer, wherein the delay timer is set to a deferred duration; responsive to the delay timer expiring, generating a further template process; and associating the further template process with the determined process class, wherein the further template process and the determined forked template process are associated with different randomized memory layouts. configuring, a plurality of process classes (142, 144, 146), comprising associating each of the process classes with a template process (112, 114, 116) among a plurality of template processes and associating each template process, of the plurality of template processes, with a different randomized memory layout among a plurality of randomized memory layouts, at least one of said randomized memory layouts being associated with a plurality of applications in the same template process; receiving, a launching request for an application (122, 124, 126); in response to the receiving the launching request, determining a process class that is associated with the application (122, 124, 146); in response to the determining, launching the application through a forked template process associated with the determined process class, wherein other different forked template processes from the plurality of template processes are running on the mobile device; determining a number of applications that have been launched by the forked template process associated with the determined process class; determining that the number of applications that have been launched by the determined forked template process meets a threshold; and in response to determining that the number of applications that have been launched by the forked template process meets the threshold: starting a delay timer, wherein the delay timer is set to a deferred duration; responsive to the delay timer expiring, generating a further template process; and associating the further template process with the determined process class, wherein the further template process and the determined forked template process are associated with different randomized memory layouts. starting a delay timer, wherein the delay timer is set to a deferred duration; responsive to the delay timer expiring, generating a further template process; and associating the further template process with the determined process class, wherein the further template process and the determined forked template process are associated with different randomized memory layouts.