Skip to content

Commit 488d33d

Browse files
committed
Cleanup
1 parent e31c4ac commit 488d33d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Zend/zend_alloc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,7 +3438,7 @@ static zend_always_inline void tracked_check_limit(zend_mm_heap *heap, size_t ad
34383438
static void *tracked_malloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
34393439
{
34403440
zend_mm_heap *heap = AG(mm_heap);
3441-
ZEND_MM_UNPOISON_HEAP(heap);
3441+
// Assume it is already unpoisoned
34423442
tracked_check_limit(heap, size);
34433443

34443444
void *ptr = malloc(size);
@@ -3450,7 +3450,6 @@ static void *tracked_malloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC
34503450
#if ZEND_MM_STAT
34513451
heap->size += size;
34523452
#endif
3453-
ZEND_MM_POISON_HEAP(heap);
34543453
return ptr;
34553454
}
34563455

@@ -3460,19 +3459,16 @@ static void tracked_free(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) {
34603459
}
34613460

34623461
zend_mm_heap *heap = AG(mm_heap);
3463-
ZEND_MM_UNPOISON_HEAP(heap);
34643462
zval *size_zv = tracked_get_size_zv(heap, ptr);
34653463
#if ZEND_MM_STAT
34663464
heap->size -= Z_LVAL_P(size_zv);
34673465
#endif
34683466
zend_hash_del_bucket(heap->tracked_allocs, (Bucket *) size_zv);
3469-
ZEND_MM_POISON_HEAP(heap);
34703467
free(ptr);
34713468
}
34723469

34733470
static void *tracked_realloc(void *ptr, size_t new_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) {
34743471
zend_mm_heap *heap = AG(mm_heap);
3475-
ZEND_MM_UNPOISON_HEAP(heap);
34763472
zval *old_size_zv = NULL;
34773473
size_t old_size = 0;
34783474
if (ptr) {
@@ -3494,7 +3490,6 @@ static void *tracked_realloc(void *ptr, size_t new_size ZEND_FILE_LINE_DC ZEND_F
34943490
#if ZEND_MM_STAT
34953491
heap->size += new_size - old_size;
34963492
#endif
3497-
ZEND_MM_POISON_HEAP(heap);
34983493
return ptr;
34993494
}
35003495

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy