@@ -705,7 +705,7 @@ INTERNAL_HIDDEN iso_alloc_zone *_iso_new_zone(size_t size, bool internal) {
705705 MASK_ZONE_PTRS (new_zone );
706706
707707 /* The lookup table is never used for custom zones */
708- if (internal == true) {
708+ if (LIKELY ( internal == true) ) {
709709 /* If no other zones of this size exist then set the
710710 * index in the zone lookup table to its index */
711711 if (_zone_lookup_table [size ] == 0 ) {
@@ -1094,7 +1094,7 @@ INTERNAL_HIDDEN void *_iso_alloc_bitslot_from_zone(bit_slot_t bitslot, iso_alloc
10941094#if !ENABLE_ASAN && !DISABLE_CANARY
10951095 if ((GET_BIT (b , (which_bit + 1 ))) == 1 ) {
10961096 check_canary (zone , p );
1097- memset ( p , 0x0 , CANARY_SIZE ) ;
1097+ * ( uint64_t * ) p = 0x0 ;
10981098 }
10991099#endif
11001100
@@ -1447,9 +1447,9 @@ INTERNAL_HIDDEN INLINE void check_big_canary(iso_alloc_big_zone *big) {
14471447 * unbounded string reads from leaking it */
14481448INTERNAL_HIDDEN INLINE void write_canary (iso_alloc_zone * zone , void * p ) {
14491449 uint64_t canary = (zone -> canary_secret ^ (uint64_t ) p ) & CANARY_VALIDATE_MASK ;
1450- memcpy ( p , & canary , CANARY_SIZE ) ;
1450+ * ( uint64_t * ) p = canary ;
14511451 p += (zone -> chunk_size - sizeof (uint64_t ));
1452- memcpy ( p , & canary , CANARY_SIZE ) ;
1452+ * ( uint64_t * ) p = canary ;
14531453}
14541454
14551455/* Verify the canary value in an allocation */
0 commit comments