Welcome! Log In Create A New Profile

Advanced

Could anyone can tell me why the operator in this code is '>=' ?

July 10, 2012 10:01PM
ngx_slab.c

void *
ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size)
{
size_t s;
uintptr_t p, n, m, mask, *bitmap;
ngx_uint_t i, slot, shift, map;
ngx_slab_page_t *page, *prev, *slots;

if (size >= ngx_slab_max_size) { // why not '>' ?

ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, ngx_cycle->log, 0,
"slab alloc: %uz", size);
Subject Author Posted

Could anyone can tell me why the operator in this code is '>=' ?

mogu0401 July 10, 2012 10:01PM

Re: Could anyone can tell me why the operator in this code is '>=' ?

mogu0401 July 12, 2012 03:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready