MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rename to be self descriptory

+5 -9
+5 -9
include/arena.h
··· 33 33 } 34 34 } 35 35 36 - static inline void *ant_gc_check_ptr(void *p, const char *func) { 36 + static inline void *mantissa_chk(void *p, const char *func) { 37 37 if (p && ((uintptr_t)p >> 48) != 0) { 38 38 fprintf(stderr, 39 39 "FATAL: %s returned pointer %p outside 48-bit NaN-boxing range\n" ··· 44 44 return p; 45 45 } 46 46 47 - #define ANT_GC_MALLOC(size) \ 48 - ant_gc_check_ptr(GC_MALLOC_IGNORE_OFF_PAGE(size), "GC_MALLOC") 49 - #define ANT_GC_MALLOC_ATOMIC(size) \ 50 - ant_gc_check_ptr(GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(size), "GC_MALLOC_ATOMIC") 51 - #define ANT_GC_REALLOC(ptr, size) \ 52 - ant_gc_check_ptr(GC_REALLOC(ptr, size), "GC_REALLOC") 53 - 54 - #define ANT_GC_FREE(ptr) GC_FREE(ptr) 47 + #define ANT_GC_MALLOC(size) mantissa_chk(GC_MALLOC_IGNORE_OFF_PAGE(size), "GC_MALLOC") 48 + #define ANT_GC_REALLOC(ptr, size) mantissa_chk(GC_REALLOC(ptr, size), "GC_REALLOC") 49 + #define ANT_GC_MALLOC_ATOMIC(size) mantissa_chk(GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(size), "GC_MALLOC_ATOMIC") 55 50 51 + #define ANT_GC_FREE(ptr) GC_FREE(ptr) 56 52 #define ANT_GC_REGISTER_ROOT(ptr) 57 53 #define ANT_GC_UNREGISTER_ROOT(ptr) 58 54