https://github.com/aurasphere/flip
A Java library for doing stuff you are not supposed to.
https://github.com/aurasphere/flip
dynamic-programming java memory-allocation memory-management unsafe
Last synced: 19 days ago
JSON representation
A Java library for doing stuff you are not supposed to.
- Host: GitHub
- URL: https://github.com/aurasphere/flip
- Owner: aurasphere
- License: mit
- Created: 2017-09-22T10:04:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T23:22:54.000Z (almost 6 years ago)
- Last Synced: 2025-03-30T06:02:11.802Z (over 1 year ago)
- Topics: dynamic-programming, java, memory-allocation, memory-management, unsafe
- Language: Java
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.paypal.com/donate/?cmd=_donations&business=8UK2BZP2K8NSS)
# flip
A Java library for doing stuff you are not supposed to.
The library is heavily based on the sun.misc.Unsafe class and thus is usage in production environments is discouraged because of portability issues.
This library includes the following methods:
- **getObjectAddress**: returns the memory address of an object instance
- **getClassAddress**: returns the memory address of a Class object from an object instance
- **sizeOf**: computes the shallow size of an object
- **readObject**: reads an object from a memory address
- **shallowCopy**: copies an object to a new memory location or overwriting another existing one
- **dynamicClassDefinition**: dynamically defines a new class by compiling a source code string passed as argument. The new class can be used immediately through reflection
- **getUnsafe**: exposes the sun.misc.Unsafe object