Skip to content

Instantly share code, notes, and snippets.

#![feature(bench_black_box)]
use std::hint::black_box;
use jemallocator::Jemalloc;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
const PAGE_SIZE: usize = 4096;
use core::mem::transmute;
use cty::*;
#[repr(C)]
pub struct pt_regs {
pub r15: c_ulong,
pub r14: c_ulong,
pub r13: c_ulong,
pub r12: c_ulong,
pub bp: c_ulong,
@alessandrod
alessandrod / tasks.json
Last active September 8, 2016 02:54
vscode tasks.json to build C/C++ projects which use make
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "env",
"isShellCommand": true,
"args": [],
"showOutput": "always",
"declares": [
{
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 057fc81..b02754a 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -2768,14 +2768,31 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
agent->compatibility == NICE_COMPATIBILITY_OC2007R2) &&
stun_message_get_class (resp) == STUN_ERROR &&
stun_message_find_error (resp, &code) ==
- STUN_MESSAGE_RETURN_SUCCESS &&
- recv_realm != NULL && recv_realm_len > 0) {
from argparse import ArgumentParser
import re
import os
PARSER_STATE_NONE = 0
PARSER_STATE_FILES = 1
PARSER_STATE_SYMBOLS = 2
def format_size(num):
for x in ['bytes','KB','MB','GB']:
diff -r -u indent-2.2.9.orig/man/texinfo2man.c indent-2.2.9/man/texinfo2man.c
--- indent-2.2.9.orig/man/texinfo2man.c 2002-01-17 20:28:51.000000000 +0100
+++ indent-2.2.9/man/texinfo2man.c 2009-12-30 21:34:37.000000000 +0100
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
#include <ctype.h>