View aws_lambda_forking.py
import json
import subprocess
def lambda_handler(event, context):
p = subprocess.Popen(["env"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
print p.communicate(json.dumps(event))[0]
return p.returncode
View OOMerHeap.java
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class OOMerHeap {
public static void main(String[] args) {