Constructor and Description |
---|
Type()
Create a new Type
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
memoryUsage(java.lang.Object object)
Report on the memory usage of an object.
|
void |
typeSize(java.lang.Object object,
OutParameter<java.lang.String> report)
Deprecated.
This method is deprecated, please use
the Type.memoryUsage() method.
|
public Type()
@Deprecated public final void typeSize(java.lang.Object object, OutParameter<java.lang.String> report)
public final java.lang.String memoryUsage(java.lang.Object object)
Report on the memory usage of an object.
object
- An instance of the object to report
upon.
Return a report containing information about the memory allocations for the passed in object.
The memory size information is reported in two parts; the requested allocation size and the actual size allocated. The actual size allocated is a combination of the requested size plus the allocation header, and is then rounded up to the nearest allocator bucket size. In PRODUCTION mode the allocation header is 40 bytes, in DEVELOPMENT mode it is 80 bytes.
The reporting of complex types involves the examination of each complex attribute in the instance passed in, and reporting the current size of the data stored. This is done recursively through any embedded structure, sequence, or any stored in the type. When using this method, a representative sample of the instance should be created and populated before calling this method.
Warnings:
Object sizes are only accurate for committed objects. The object must be created in a separate transaction before it is used to report on sizes.