source: src/examples/gc_no_raii/internal/globals.h @ e47f529

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationresolv-newwith_gc
Last change on this file since e47f529 was e47f529, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

more conversion and compile seems to work well

  • Property mode set to 100644
File size: 601 bytes
Line 
1#pragma once
2
3#include <stddef.h>
4#include <stdint.h>
5
6static const size_t POOL_SIZE_EXP = 24;
7static const size_t POOL_SIZE_BYTES = 0x1 << POOL_SIZE_EXP;
8static const size_t POOL_PTR_MASK = ~(POOL_SIZE_BYTES - 1);
9
10static const size_t CARDS_SIZE_EXP = 12;
11static const size_t CARDS_SIZE_BYTES = 0x1 << CARDS_SIZE_EXP;
12static const size_t CARDS_OFFSET_MASK = (~(CARDS_SIZE_BYTES - 1)) & (POOL_SIZE_BYTES - 1);
13static const size_t CARDS_COUNT = POOL_SIZE_BYTES / CARDS_SIZE_BYTES;
14
15static const size_t OBJECT_ALLIGNMENT = sizeof(size_t);
16static const size_t OBJECT_PTR_MASK = ~(OBJECT_ALLIGNMENT - 1);
Note: See TracBrowser for help on using the repository browser.