diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-07-11 12:13:59 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-07-11 12:13:59 -0300 |
commit | e450b0d47e9d05a806769d096646d723845e0ba2 (patch) | |
tree | 68b43e458651ea393c7d0774907aec0200d234c6 /page.cpp | |
parent | f1ad05bb486ec49f576580cda8e6c9a9a8b92317 (diff) | |
download | jet-e450b0d47e9d05a806769d096646d723845e0ba2.tar.gz jet-e450b0d47e9d05a806769d096646d723845e0ba2.zip |
Make client side ipc binary
Diffstat (limited to 'page.cpp')
-rw-r--r-- | page.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -1,8 +1,3 @@ -#include <stdint.h> -#include <string.h> -#include <stdlib.h> -#include <assert.h> - #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif @@ -59,28 +54,24 @@ struct Page { } void move_gap_forward() { - assert(gap_end < PAGE_SIZE); elements[gap_start] = elements[gap_end]; gap_start++; gap_end++; } void move_gap_backward() { - assert(gap_start > 0); gap_end--; gap_start--; elements[gap_end] = elements[gap_start]; } void push(uint8_t c) { - assert(element_count < PAGE_SIZE); elements[gap_start] = c; gap_start++; element_count++; } void pop() { - assert(gap_start > 0); gap_start--; element_count--; } |