diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-08-03 07:53:47 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-08-03 21:26:18 +0300 |
commit | a7b3a08d30e0498de3ad44c5e75bc21600ef9ff8 (patch) | |
tree | 5b9b28d7894dfdc9875ddd9967db4fe06a4da6dc /malloc.c | |
parent | 89308bed1754cafe54e713ef950ef04727c17299 (diff) | |
download | bdwgc-a7b3a08d30e0498de3ad44c5e75bc21600ef9ff8.tar.gz |
Use modHBLKSZ where possible
(refactoring)
* allchblk.c (GC_remove_from_fl_at, GC_add_to_fl, GC_get_first_part):
Replace v&(HBLKSIZE-1) to modHBLKSZ(v).
* allchblk.c [!GC_DISABLE_INCREMENTAL] (GC_allochblk_nth): Likewise.
* include/private/gc_priv.h (HBLKDISPL): Likewise.
* include/private/gc_hdrs.h (MAX_JUMP): Remove spaces in HBLKSIZE-1
(to match similar expressions).
* include/private/gc_priv.h (OBJ_SZ_TO_BLOCKS_CHECKED): Likewise.
* misc.c (block_add_size): Likewise.
* os_dep.c [!MSWIN_XBOX1 && !MSWINCE && (USE_WINALLOC || CYGWIN32)]
(GC_win32_get_mem): Likewise.
* include/private/gc_priv.h (HBLKMASK): Remove.
* include/private/gc_priv.h (obj_link): Remove extra space in the
expression.
* malloc.c (GC_generic_malloc_uncollectable): Replace
(word)op&(HBLKSIZE-1) to HBLKDISPL(op).
* mallocx.c (GC_realloc): Replace HBLKMASK to (HBLKSIZE-1).
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -389,7 +389,7 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_generic_malloc_uncollectable( if (op /* != NULL */) { /* CPPCHECK */ hdr * hhdr = HDR(op); - GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0); /* large block */ + GC_ASSERT(HBLKDISPL(op) == 0); /* large block */ /* We don't need the lock here, since we have an undisguised */ /* pointer. We do need to hold the lock while we adjust */ /* mark bits. */ |