This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*-c++-*- | |
#ifndef AF_ALLOCATOR_ADAPTOR_H_ | |
#define AF_ALLOCATOR_ADAPTOR_H_ | |
#include "af/allocator_interface.h" | |
#include <memory> | |
namespace af { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*-c++-*- | |
#ifndef TRIVIAL_ALLOCATOR_H_ | |
#define TRIVIAL_ALLOCATOR_H_ | |
#include <cstdlib> | |
#include <climits> | |
namespace af { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*-c++-*- | |
#ifndef TRIVIAL_ALLOCATOR_H_ | |
#define TRIVIAL_ALLOCATOR_H_ | |
#include <cstdlib> | |
#include <cassert> | |
#include <cstdint> | |
namespace af { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdexcept> | |
#include <iostream> | |
#include "circular_buffer.h" | |
/* | |
Valgrind output: | |
alex@mars:~/dev/circular-buffer$ valgrind --leak-check=yes ./circular_buffer_test | |
==21141== Memcheck, a memory error detector | |
==21141== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys, re | |
GETTER_REGEX = 'public (String|long|int|double) (get[^\(]+)' | |
LEADING_SPACES = ' ' | |
def jmxify(file_name): | |
"""Add JMX getter annotations to all public methods""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#use "topfind" | |
#thread | |
#require "core" | |
#require "pcre" | |
open Core.Std | |
module Unix = Caml.UnixLabels | |
let format_line line time = | |
let t = Unix.gmtime time in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
use POSIX; | |
sub main { | |
if(@ARGV < 3) { | |
die "Usage: $0 pattern seconds output"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<store> | |
<name>test</name> | |
<persistence>bdb</persistence> | |
<routing>client</routing> | |
<replication-factor>2</replication-factor> | |
<required-reads>2</required-reads> | |
<required-writes>2</required-writes> | |
<key-serializer> | |
<type>string</type> | |
</key-serializer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JVM_SIZE="-server -Xms18g -Xmx18g" | |
# New Generation Sizes (-XX:NewSize -XX:MaxNewSize) | |
JVM_SIZE_NEW="-XX:NewSize=2048m -XX:MaxNewSize=2048m" | |
# Type of Garbage Collector to use | |
JVM_GC_TYPE="-XX:+UseConcMarkSweepGC -XX:+UseParNewGC" | |
# Tuning options for the above garbage collector | |
JVM_GC_OPTS="-XX:CMSInitiatingOccupancyFraction=70 -XX:SurvivorRatio=2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key [(control c)(\#)] 'toggle-comment-current-line-or-region) | |
(global-set-key [(meta z)] 'repeat) | |
(global-set-key [(meta g)] 'goto-lne) | |
(global-set-key [(control c)(g)] 'goto-line) | |
(global-set-key [(control c)(control g)] 'goto-line) | |
(defun bind-autoindent () | |
(local-set-key "\r" 'indent-newline-and-indent)) | |
(defun indent-if-blank () |