Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrei Pavel andreipavelQ

View GitHub Profile
View a.cc
#include <iostream>
#include <vector>
int main(void) {
std::vector<char*> v;
for (int i = 0; i < 1024 * 1024; ++i) {
v.push_back(new char[256 * 1024 * 1024 * sizeof(char)]);
}
//for (int i = 0; i < 1024 * 1024; ++i) {
//for (int j = 0; j < 256 * 1024 * 1024; ++j) {
View const-function.cc
#include <iostream>
struct A {
void f() {
std::cout << typeid(&a_).name() << std::endl;
}
void fc() const {
std::cout << typeid(&a_).name() << std::endl;
}
int a_;
@andreipavelQ
andreipavelQ / add-config-h.sh
Last active Feb 13, 2017
Adds '#include <config.h>' to files that are missing it to .cc files
View add-config-h.sh
#!/bin/bash
# Print usage function
printUsage() {
printf "Usage: %s %s %s %s\n" \
"$(basename ${0})" \
"[-d]" \
"--kea_src_dir \$root_kea_source_directory" \
"[--name-only]"
}
View .clang-format
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
View options_doc_and_bug_fix.patch
diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml
index b70da2a..607b08a 100644
--- a/doc/guide/dhcp4-srv.xml
+++ b/doc/guide/dhcp4-srv.xml
@@ -478,8 +478,8 @@ If a timeout is given though, it should be an integer greater than zero.
</section>
</section>
-<section>
- <title id="hosts4-storage">Hosts Storage</title>
You can’t perform that action at this time.