Introduced:
We talked about JVMTI's client agent earlier, and also mentioned that the agent accesses the VM through an environment pointer. Here's a look at how much the environment pointer is capable of accessing VMS.
Category 1: Memory management
A.allocate. Allocating memory
Jvmtierrorallocate (jvmtienv* env, jlong size, unsigned char** mem_ptr)
Size: The number of bytes allocated.
Mem_ptr: The first address of the allocated memory.
B.deallocate. Frees memory, frees allocated memory, or the memory cannot be reclaimed.
Jvmtierrordeallocate (jvmtienv* env, unsigned char* mem)
MEM: The first address of the allocated memory.
This article is from the "cohesion of parallel Lines" blog, please be sure to keep this source http://supercharles888.blog.51cto.com/609344/1587693
JPDA Architecture Research 5-agent using environment pointers to access VMs (Memory management chapter)