Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

org.gridkit.heapunit:heapunit-pom

Package Overview
Maintainers
1
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.gridkit.heapunit:heapunit-pom

HeapUnit parent pom

  • 0.2
  • Source
  • Maven

Version published
Maintainers
1
Source

HeapUnit

Test library to introspecting your Java heap via heap dumps.

HeapUnit can

  • capture heap dump of own JVM
  • scan content of dump
  • reconstruct Java objects from heap dump

Example

Code snippet below dumps TCP Socket instances found in heap

HeapImage hi = HeapUnit.captureHeap();
	
for(HeapInstance i: hi.instances(SocketImpl.class)) {
	// fd field in SocketImpl class is nullified when socket gets closed
	boolean open = i.value("fd") != null;
	System.out.println(i.rehydrate() + (open ? " - open" : " - closed"));
}

Full source is here

Maven artifact

HeapUnit and dependencies is available in Maven Central Repo

<dependency>
    <groupId>org.gridkit.heapunit</groupId>
    <artifactId>heapunit</artifactId>
    <version>0.1</version>
</dependency>

FAQs

Package last updated on 12 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc