Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/klib/blob/master/test/kbarena_test.c # klib [Ported from github.com/attractivechaos/klib] added block arena Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `klib / test / kbarena_test.c` 19 lines ยท 316 bytes Raw Blame History 1 #include 2 #include "kbarena.h" 3 4 int main(void) 5 { 6 int i; 7 void *ba; 8 ba = kba_init(1000); 9 for (i = 0; i < 100; ++i) 10 kba_alloc(ba, 23, 1); 11 kba_save(ba); 12 for (i = 0; i < 100; ++i) 13 kba_alloc(ba, 29, 1); 14 kba_restore(ba); 15 for (i = 0; i < 100; ++i) 16 kba_alloc(ba, 29, 1); 17 kba_destroy(ba); 18 return 0; 19 }