Skip to content

Commit

Permalink
Change GC_GRANULE_PTRS back to two pointers for CHERI
Browse files Browse the repository at this point in the history
(fix of commit e1fb227)

Issue #627 (bdwgc).

Some code of bdwgc like `GC_generic_malloc_aligned` expects
value of `GC_GRANULE_PTRS` to be not smaller than 2.

* include/gc/gc_tiny_fl.h [!GC_GRANULE_BYTES
&& __CHERI_PURE_CAPABILITY__] (GC_GRANULE_PTRS): Define to 2.
  • Loading branch information
ivmai committed Nov 6, 2024
1 parent a61cdae commit 1bc1dd4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/gc/gc_tiny_fl.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@
#ifdef GC_GRANULE_BYTES
# define GC_GRANULE_PTRS (GC_GRANULE_BYTES / GC_SIZEOF_PTR)
#else
# if defined(__CHERI_PURE_CAPABILITY__)
# define GC_GRANULE_PTRS 1
# else
# define GC_GRANULE_PTRS 2 /* in pointers */
# endif
# define GC_GRANULE_PTRS 2 /* in pointers */
# define GC_GRANULE_BYTES (GC_GRANULE_PTRS * GC_SIZEOF_PTR)
#endif /* !GC_GRANULE_BYTES */

Expand Down

0 comments on commit 1bc1dd4

Please sign in to comment.