Skip to content

Instantly share code, notes, and snippets.

@banks
banks / ring.c
Created November 16, 2015 15:44
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include "../libmill.h"
void relay(chan in, chan out) {
int val = chr(in, int);
chs(out, int, val + 1);
['BandFmt', 'Bands', 'Bbits', 'Coding', 'Compression', 'Hist', 'Length', 'Level', 'Type', 'Xoffset', 'Xres', 'Xres_float', 'Xsize', 'Yoffset', 'Yres', 'Yres_float', 'Ysize', '__class__', '__copy__', '__deepcopy__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__gdoc__', '__ge__', '__getattribute__', '__gpointer__', '__grefcount__', '__gsignals__', '__gt__', '__gtype__', '__hash__', '__info__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_force_floating', '_ref', '_ref_sink', '_unref', '_unsupported_data_method', '_unsupported_method', 'argument_isset', 'argument_needsstring', 'argument_table', 'baseaddr', 'bind_property', 'bind_property_full', 'build', 'chain', 'client1', 'client2', 'close', 'compat_control', 'connect', 'connect_after', 'connect_data', 'connect_object', 'connect_object_after', 'constructed', 'data', 'decode', 'decode_predict', 'delete_on_close', 'del
<?php
// Example to accompany blog post:
// http://blog.banksdesigns.co.uk/post/when-not-to-use-arrays-in-php
ini_set('memory_limit', '512M');
$array_2d = $array_strings = array();
$mem_start = memory_get_usage();