aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_slab.c
Commit message (Collapse)AuthorAge
* Slab: removed redundant page calculation (ticket #1721).Maxim Dounin2019-02-12
|
* Slab: fixed initialization on win32.Ruslan Ermilov2017-08-08
| | | | | | On Windows, a worker process does not call ngx_slab_init() from ngx_init_zone_pool(), so ngx_slab_max_size, ngx_slab_exact_size, and ngx_slab_exact_shift were left uninitialized.
* Slab: fixed small allocations on systems with large pagesize.Ruslan Ermilov2017-07-04
| | | | | | Notably, on ppc64 with 64k pagesize, slab 0 (of size 8) requires 128 64-bit elements for bitmasks. The code bogusly assumed that one uintptr_t is enough for bitmasks plus at least one free slot.
* Slab: style.Ruslan Ermilov2017-07-04
|
* Win32: support 64-bit compilation with MSVC.Maxim Dounin2016-12-24
| | | | | | | | | | | | | | | | | | | | | | | There are lots of C4244 warnings (conversion from 'type1' to 'type2', possible loss of data), so they were disabled. The same applies to C4267 warnings (conversion from 'size_t' to 'type', possible loss of data), most notably - conversion from ngx_str_t.len to ngx_variable_value_t.len (which is unsigned:28). Additionally, there is at least one case when it is not possible to fix the warning properly without introducing win32-specific code: recv() on win32 uses "int len", while POSIX defines "size_t len". The ssize_t type now properly defined for 64-bit compilation with MSVC. Caught by warning C4305 (truncation from '__int64' to 'ssize_t'), on "cutoff = NGX_MAX_SIZE_T_VALUE / 10" in ngx_atosz()). Several C4334 warnings (result of 32-bit shift implicitly converted to 64 bits) were fixed by adding explicit conversions. Several C4214 warnings (nonstandard extension used: bit field types other than int) in ngx_http_script.h fixed by changing bit field types from uintptr_t to unsigned.
* Slab: commented bitmap initialization for small allocations.Ruslan Ermilov2016-12-08
|
* Slab: free pages statistics.Ruslan Ermilov2016-12-07
|
* Slab: slots statistics.Ruslan Ermilov2016-12-07
| | | | | For each slot, the number of total and used entries, as well as the number of allocation requests and failures, are tracked.
* Slab: simplified some math.Ruslan Ermilov2016-12-07
| | | | No functional changes.
* Slab: simplified allocation from slots.Ruslan Ermilov2016-12-07
| | | | | | Removed code that would cause an endless loop, and removed condition check that is always false. The first page in the slot list is guaranteed to satisfy an allocation.
* Slab: fixed the number of pages calculation.Ruslan Ermilov2016-12-07
| | | | | When estimating the number of pages, do not count memory for slots. In some cases this gives one extra usable memory page.
* Slab: added comment about list heads.Ruslan Ermilov2016-12-07
|
* Slab: improved code readability.Ruslan Ermilov2016-12-07
| | | | No functional changes.
* Slab: improved double free detection.Ruslan Ermilov2016-12-03
| | | | | Previously, an attempt to double free the starting page of the free range was not detected.
* Slab: always show the requested allocation size in debug messages.Ruslan Ermilov2016-12-03
| | | | Previously, allocations smaller than min_size were shown as min_size.
* Slab: style.Ruslan Ermilov2016-12-03
| | | | Removed redundant parentheses. No functional changes.
* Fixed logging.Sergey Kandaurov2016-03-31
|
* Style.Ruslan Ermilov2016-03-30
|
* Core: bugfix for the ngx_slab_max_size case.Jianjun Zheng2014-06-18
|
* Core: added ngx_slab_calloc() and ngx_slab_calloc_locked().Ruslan Ermilov2014-06-04
| | | | These functions return zeroed memory, analogous to ngx_pcalloc().
* Core: slab allocator free pages defragmentation.Maxim Dounin2014-06-03
| | | | | | | | | | Large allocations from a slab pool result in free page blocks being fragmented, eventually leading to a situation when no further allocation larger than a page size are possible from the pool. While this isn't a problem for nginx itself, it is known to be bad for various 3rd party modules. Fix is to merge adjacent blocks of free pages in the ngx_slab_free_pages() function. Prodded by Wandenberg Peixoto and Yichun Zhang.
* Core: slab log_nomem flag.Maxim Dounin2014-03-31
| | | | | | | | | The flag allows to suppress "ngx_slab_alloc() failed: no memory" messages from a slab allocator, e.g., if an LRU expiration is used by a consumer and allocation failures aren't fatal. The flag is now used in the SSL session cache code, and in the limit_req module.
* Handling of ngx_int_t != intptr_t case.Maxim Dounin2013-09-04
| | | | | | | | | Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
* Fixed overflow if ngx_slab_alloc() is called with very big "size" argument.Ruslan Ermilov2012-08-30
|
* Reduced the number of preprocessor directives.Ruslan Ermilov2012-07-26
|
* Copyright updated.Maxim Konovalov2012-01-18
|
* Using of junk value in slab allocator similar to modern FreeBSD values.Igor Sysoev2011-10-24
|
* malloc() debugging on MacOSX.Igor Sysoev2011-10-24
|
* fix building by BCC without NGX_DEBUG_MALLOCIgor Sysoev2009-04-15
|
* improve ngx_slab_alloc() error loggingIgor Sysoev2009-03-27
|
* delete old debugging and infoIgor Sysoev2009-03-27
|
* fix slab page or more sized allocations if nginx was build without debugIgor Sysoev2009-01-25
|
* style fixIgor Sysoev2009-01-12
|
* take MALLOC_OPTIONS=J into account in slab allocatorIgor Sysoev2007-12-22
|
* the simple expression has the same precision without overflowIgor Sysoev2007-11-16
|
* fix slab allocator on 64-bit platfromsIgor Sysoev2007-01-11
|
* fix slab allocator on 64-bit platfromsIgor Sysoev2007-01-11
|
* style fixIgor Sysoev2007-01-02
|
* many bug fixes and ngx_slab_alloc_locked()/ngx_slab_free_locked()Igor Sysoev2007-01-02
|
* fix building on 64-bit platformsIgor Sysoev2006-11-27
|
* slab allocator in shared memoryIgor Sysoev2006-11-20
|
* undo the previous wrong commitIgor Sysoev2006-10-28
|
* bad commitIgor Sysoev2006-10-28
|
* nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyrightIgor Sysoev2004-09-29
|
* nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused filesIgor Sysoev2004-09-28
|
* nginx-0.0.7-2004-06-16-23:36:07 importIgor Sysoev2004-06-16