-
In
~/.ssh/config
, include the lines:Host * ControlPath ~/.ssh/sockets/%r@%h-%p
//===----------------------------------------------------------------------===// | |
// | |
// BusTub | |
// | |
// clock_replacer.cpp | |
// | |
// Identification: src/buffer/clock_replacer.cpp | |
// | |
// Copyright (c) 2015-2019, Carnegie Mellon University Database Group | |
// |
//===----------------------------------------------------------------------===// | |
// | |
// BusTub | |
// | |
// lru_replacer.cpp | |
// | |
// Identification: src/buffer/lru_replacer.cpp | |
// | |
// Copyright (c) 2015-2019, Carnegie Mellon University Database Group | |
// |
#include <vector> | |
struct LRUKV { | |
int key_; | |
int value_; | |
LRUKV(int key, int value) :key_(key), value_(value) {} | |
}; | |
class LRUCache { | |
public: |
struct LRUKV { | |
int key_; | |
int value_; | |
LRUKV(int key, int value) :key_(key), value_(value) {} | |
}; | |
class LRUCache { | |
public: | |
LRUCache(int capacity) | |
:cache_size_(capacity), |
//===----------------------------------------------------------------------===// | |
// | |
// BusTub | |
// | |
// buffer_pool_manager.cpp | |
// | |
// Identification: src/buffer/buffer_pool_manager.cpp | |
// | |
// Copyright (c) 2015-2019, Carnegie Mellon University Database Group | |
// |
" Specify a directory for plugins | |
" - For Neovim: stdpath('data') . '/plugged' | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
Plug 'rhysd/vim-clang-format' | |
" On-demand loading | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } |
package main | |
type items []int | |
var nilItems = make(items, 16) | |
func (s *items) truncate1(i int) { | |
*s = (*s)[:i] | |
} |
/* | |
* memlib.c - a module that simulates the memory system. Needed | |
* because it allows us to interleave calls from the student's malloc | |
* package with the system's malloc package in libc. | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <unistd.h> |
/* $begin memlibheader */ | |
#include <unistd.h> | |
void mem_init(void); | |
void *mem_sbrk(int incr); | |
void mem_deinit(void); | |
void mem_reset_brk(void); | |
void *mem_heap_lo(void); | |
void *mem_heap_hi(void); |