summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-08-03 07:53:47 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-08-03 21:26:18 +0300
commita7b3a08d30e0498de3ad44c5e75bc21600ef9ff8 (patch)
tree5b9b28d7894dfdc9875ddd9967db4fe06a4da6dc /os_dep.c
parent89308bed1754cafe54e713ef950ef04727c17299 (diff)
downloadbdwgc-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 'os_dep.c')
-rw-r--r--os_dep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os_dep.c b/os_dep.c
index ce91b30d..61b8d53c 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -2454,8 +2454,8 @@ void * os2_alloc(size_t bytes)
/* problems, so we dodge the issue. */
result = (ptr_t)GlobalAlloc(0, SIZET_SAT_ADD(bytes, HBLKSIZE));
/* Align it at HBLKSIZE boundary. */
- result = (ptr_t)(((word)result + HBLKSIZE - 1)
- & ~(word)(HBLKSIZE - 1));
+ result = (ptr_t)(((word)result + HBLKSIZE-1)
+ & ~(word)(HBLKSIZE-1));
} else
# endif
/* else */ {