Skip to content

Instantly share code, notes, and snippets.

View gvsmirnov's full-sized avatar

Gleb Smirnov gvsmirnov

  • Bayesian Conspiracy (probably)
  • The Multiverse
View GitHub Profile
@gvsmirnov
gvsmirnov / TheForceTester.java
Created April 22, 2012 02:57
Produces an OutOfMemoryError! Whoa!
public class TheForceTester {
public static final int ARRAY_SIZE = 1000000;
public static void main(String[] args) {
while (true) {
byte[] lotsOfUsefulData = new byte[ARRAY_SIZE];
}
}
@gvsmirnov
gvsmirnov / universe.hpp
Created April 21, 2012 14:52
Just the Universe being way too friendly
class Universe: AllStatic {
// Ugh. Universe is much too friendly.
friend class MarkSweep;
friend class oopDesc;
friend class ClassLoader;
friend class Arguments;
friend class SystemDictionary;
friend class VMStructs;
friend class CompactingPermGenGen;
friend class VM_PopulateDumpSharedSpace;