jvm - Java nonblocking memory allocation -
I have read somewhere that Java can allocate memory for objects in almost 12 machine instructions. This is very effective for me as far as I understand that using any move using JVM is undoing memory in memory. This help in reducing the number of requests for operating system, which is quite expensive, I think but even CAS operations can be spent up to 150 cycles on modern processors.
So, can the real cost of memory allocation be realized in Java and what moves to accelerate the allocation of JVM using allocation?
JVM already allocates memory area for each thread (TLA or thread local area) . When a thread needs to allocate memory, then it will use "collision with allocation allocation" in that area. (If "Free Pointer" points to 10, and the object size to be allotted is 50, then we only confront the free pointer in 60, and tell the thread that it is 10 and 10 59 can use the memory).
Comments
Post a Comment