Welcome! Log In Create A New Profile

Advanced

[njs] Fixed building with CFLAGS=-DNXT_DEBUG_MEMORY=1 by some compilers.

December 08, 2016 11:54AM
details: http://hg.nginx.org/njs/rev/6a60530c7b6b
branches:
changeset: 279:6a60530c7b6b
user: Igor Sysoev <igor@sysoev.ru>
date: Thu Dec 08 19:50:03 2016 +0300
description:
Fixed building with CFLAGS=-DNXT_DEBUG_MEMORY=1 by some compilers.

diffstat:

nxt/nxt_mem_cache_pool.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)

diffs (43 lines):

diff -r af66e460d7a0 -r 6a60530c7b6b nxt/nxt_mem_cache_pool.c
--- a/nxt/nxt_mem_cache_pool.c Thu Dec 08 19:29:40 2016 +0300
+++ b/nxt/nxt_mem_cache_pool.c Thu Dec 08 19:50:03 2016 +0300
@@ -284,19 +284,6 @@ nxt_mem_cache_pool_destroy(nxt_mem_cache
}


-nxt_inline u_char *
-nxt_mem_cache_page_addr(nxt_mem_cache_pool_t *pool, nxt_mem_cache_page_t *page)
-{
- nxt_mem_cache_block_t *block;
-
- block = (nxt_mem_cache_block_t *)
- ((u_char *) page - page->number * sizeof(nxt_mem_cache_page_t)
- - offsetof(nxt_mem_cache_block_t, pages));
-
- return block->start + (page->number << pool->page_size_shift);
-}
-
-
void *
nxt_mem_cache_alloc(nxt_mem_cache_pool_t *pool, size_t size)
{
@@ -379,6 +366,19 @@ nxt_mem_cache_zalign(nxt_mem_cache_pool_

#if !(NXT_DEBUG_MEMORY)

+nxt_inline u_char *
+nxt_mem_cache_page_addr(nxt_mem_cache_pool_t *pool, nxt_mem_cache_page_t *page)
+{
+ nxt_mem_cache_block_t *block;
+
+ block = (nxt_mem_cache_block_t *)
+ ((u_char *) page - page->number * sizeof(nxt_mem_cache_page_t)
+ - offsetof(nxt_mem_cache_block_t, pages));
+
+ return block->start + (page->number << pool->page_size_shift);
+}
+
+
static void *
nxt_mem_cache_alloc_small(nxt_mem_cache_pool_t *pool, size_t size)
{
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed building with CFLAGS=-DNXT_DEBUG_MEMORY=1 by some compilers.

Igor Sysoev 645 December 08, 2016 11:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready