History log of /PHP-8.4/Zend/zend_alloc.c (Results 26 – 50 of 496)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ca134f7a 20-Mar-2022 Ilija Tovilo

Remove unused include of stdbool.h


# a83cc9d3 20-Mar-2022 Max Kellermann

Zend/zend_alloc: use bool and make internal variable static (#8230)

* Zend/zend_alloc: make zend_mm_use_huge_pages static

This is an internal variable and it should not be exported.

Zend/zend_alloc: use bool and make internal variable static (#8230)

* Zend/zend_alloc: make zend_mm_use_huge_pages static

This is an internal variable and it should not be exported.

* Zend/zend_alloc: convert zend_mm_use_huge_pages to bool

* Zend/zend_alloc: convert has_free_pages to bool

* Zend/zend_alloc: convert empty to bool

show more ...


# c9385ee1 19-Mar-2022 David CARLIER

zend_mm_map_fixed using MAP_TRYFIXED on NetBSD.DragonFlyBSD

attempts to map on addr but does not replace it if already present.
Note on OpenBSD it has no effect, addr is used just as a h

zend_mm_map_fixed using MAP_TRYFIXED on NetBSD.DragonFlyBSD

attempts to map on addr but does not replace it if already present.
Note on OpenBSD it has no effect, addr is used just as a hint.

Closes GH-7923.

show more ...


# 67440096 04-Mar-2022 Patrick Allaert

Added: [zend_]memory_reset_peak_usage() (#8151)


# 8c60e215 24-Feb-2022 Patrick Allaert

Avoid possible [-Wstrict-prototypes] build warnings


# c035298e 08-Feb-2022 Dmitry Stogov

Free cached chunks when the requested memory limit is above real usage


# 1a4d2dd9 21-Dec-2021 David CARLIER

zend alloc USE_ZEND_ALLOC_HUGE_PAGES option support on solaris based systems (#7789)


Revision tags: php-8.0.14, php-8.1.1, php-7.4.27
# 5675ebe6 09-Dec-2021 Christoph M. Becker

Fix #81585: cached_chunks are not counted to real_size on shutdown

The amount of allocated system memory is kept in `real_size`, including
the allocated `cached_chunks`. Thus, we need t

Fix #81585: cached_chunks are not counted to real_size on shutdown

The amount of allocated system memory is kept in `real_size`, including
the allocated `cached_chunks`. Thus, we need to keep the proper count
at the end of the shutdown.

Closes GH-7745.

show more ...


Revision tags: php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3
# 1553dfaf 27-Sep-2021 Nikita Popov

Avoid __zend_malloc() wrapper in tracked_malloc()

oss-fuzz currently coalesces all leaks into one issue, presumably
because the five lowest stack frames always look the same. Let's
s

Avoid __zend_malloc() wrapper in tracked_malloc()

oss-fuzz currently coalesces all leaks into one issue, presumably
because the five lowest stack frames always look the same. Let's
see whether dropping the __zend_malloc() frame helps.

show more ...


Revision tags: php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1
# cce31657 13-Jul-2021 Nikita Popov

Fix typo

Accidentially dropped the "!" here.


# 989205e9 12-Jul-2021 Nikita Popov

Remove incorrect uses of zend_atoi()

zend_atoi() parses integers with size suffixes (like "128M").
These just want to use a plain number, so use ZEND_ATOL instead.


Revision tags: php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs


Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20
# e9b00515 31-May-2021 Nikita Popov

Fix output buffer discard on memory limit

Move this code directly into the error handler, and check the
heap->overflow flag. Discarding output here allows us to print
the normal memo

Fix output buffer discard on memory limit

Move this code directly into the error handler, and check the
heap->overflow flag. Discarding output here allows us to print
the normal memory limit message to standard output. Otherwise
nothing would be printed unless a different log medium was used,
which makes for a suboptimal debugging experience.

show more ...


# 3a4ea6cb 30-May-2021 Peter van Dommelen

Don't automatically adjust memory_limit to 2M

As PHP has a minimum memory usage of 2M (size of allocator chunk),
setting a limit below that value is not meaningful and will be
automa

Don't automatically adjust memory_limit to 2M

As PHP has a minimum memory usage of 2M (size of allocator chunk),
setting a limit below that value is not meaningful and will be
automatically rounded up to the chunk size. Rather than doing this
silently, show the newly introduced error message.

The memory limit had to be increased to 2M for a number of tests.

tests/lang/bug45392 has been marked as XFAIL. This old bugfix is
not working as intended. The memory limit in main's `PG(memory_limit)`
differs from the one in zend_alloc. In zend_alloc the `AG(mm_heap)->limit`
is defined as `max(passed_value, ZEND_MM_CHUNK_SIZE)`. The check made in
an unclean shutdown will never be true unless the memory limit is lower
than ZEND_MM_CHUNK_SIZE, which happened to be the case in the test.
https://bugs.php.net/bug.php?id=45392
https://github.com/php/php-src/commit/fcc0fdd125fdb9e1713f91d027fe07d680a0cf36

show more ...


# 1aafed5e 31-May-2021 Nikita Popov

Remove zend_set_memory_limit_ex() API

This was added temporarily for the PHP-8.0 branch to avoid an
ABI break.


# 1b3b5c94 30-May-2021 Peter van Dommelen

Fixed bug #81070

When the memory limit is reduced using an `ini_set("memory_limit", ..)`
below the currently allocated memory, the out-of-memory check overflowed.
Instead of implemen

Fixed bug #81070

When the memory limit is reduced using an `ini_set("memory_limit", ..)`
below the currently allocated memory, the out-of-memory check overflowed.
Instead of implementing additional checks during allocation,
`zend_set_memory_limit()` now validates the new memory limit. When
below the current memory usage the ini_set call will fail and throw
a warning.

This is part of GH-7040.

show more ...


Revision tags: php-8.0.7RC1, php-7.4.20RC1
# c40231af 12-May-2021 George Peter Banyard

Mark various functions with void arguments.

This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.


Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...


# 600402d9 07-Apr-2021 fishmore <37470985+bigboysun@users.noreply.github.com>

Update zend_alloc.c

Don't free main thunk. It will crash.


Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1
# 2b93ae60 13-Feb-2021 David CARLIER

Use VM_MAKE_TAG for macos memory tag

In case Apple changes the meaning of the macro in the future.

Closes GH-6687.


Revision tags: php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1
# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...


Revision tags: php-8.0.1, php-7.4.14, php-7.3.26
# 95a4e1ea 17-Dec-2020 Levi Morrison

Fix ubsan error on Mac

Fixes this error:
> Zend/zend_alloc.c:473:73: runtime error: left shift of 250 by 24 places cannot be represented in type 'int'


Revision tags: php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22
# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...


# 5db44e39 28-Aug-2020 Nikita Popov

Fix tracked_realloc

We should only drop the information about the old allocation after
checking the memory limit. This makes the code a bit more awkward...


# bd6feb7b 26-Aug-2020 Nikita Popov

Enforce memory limit in tracked allocation mode

A very basic limit (for single allocations) was already enforced.
This extends it to count the total memory allocations.

This is

Enforce memory limit in tracked allocation mode

A very basic limit (for single allocations) was already enforced.
This extends it to count the total memory allocations.

This is useful to avoid out of memory conditions while fuzzing.

show more ...


12345678910>>...20