1. A method of allocating shared memory to isolates in a Java Virtual Machine (JVM), the method comprising: operating multiple isolates within a single JVM, wherein the isolates share a memory; for each isolate: assigning a memory limit identifying a maximum amount of shared memory usable by the isolate at one time; allocating a first local buffer to the isolate from the shared memory; and allocating space from the first local buffer for storing objects, without determining whether allocation of said space will cause the isolate to exceed its memory limit; and when a first isolate requires additional shared memory, estimating an amount of shared memory used by the first isolate.