mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-16 05:37:18 +03:00
Avoid a -Wundef warning on LG_SLAB_MAXREGS.
This commit is contained in:
parent
40cf71a06d
commit
7ad2f78663
3 changed files with 11 additions and 9 deletions
|
|
@ -183,7 +183,7 @@
|
|||
#undef LG_PAGE
|
||||
|
||||
/* Maximum number of regions in a slab. */
|
||||
#undef LG_SLAB_MAXREGS
|
||||
#undef CONFIG_LG_SLAB_MAXREGS
|
||||
|
||||
/*
|
||||
* One huge page is 2^LG_HUGEPAGE bytes. Note that this is defined even if the
|
||||
|
|
|
|||
|
|
@ -270,15 +270,17 @@
|
|||
#define SC_LARGE_MAXCLASS (SC_MAX_BASE + (SC_NGROUP - 1) * SC_MAX_DELTA)
|
||||
|
||||
/* Maximum number of regions in one slab. */
|
||||
#ifndef LG_SLAB_MAXREGS
|
||||
#ifndef CONFIG_LG_SLAB_MAXREGS
|
||||
# define SC_LG_SLAB_MAXREGS (LG_PAGE - SC_LG_TINY_MIN)
|
||||
#elif (LG_SLAB_MAXREGS < (LG_PAGE - SC_LG_TINY_MIN))
|
||||
# error "Unsupported SC_LG_SLAB_MAXREGS"
|
||||
#else
|
||||
# define SC_LG_SLAB_MAXREGS LG_SLAB_MAXREGS
|
||||
# if CONFIG_LG_SLAB_MAXREGS < (LG_PAGE - SC_LG_TINY_MIN)
|
||||
# error "Unsupported SC_LG_SLAB_MAXREGS"
|
||||
# else
|
||||
# define SC_LG_SLAB_MAXREGS CONFIG_LG_SLAB_MAXREGS
|
||||
# endif
|
||||
#endif
|
||||
#define SC_SLAB_MAXREGS (1U << SC_LG_SLAB_MAXREGS)
|
||||
|
||||
#define SC_SLAB_MAXREGS (1U << SC_LG_SLAB_MAXREGS)
|
||||
|
||||
typedef struct sc_s sc_t;
|
||||
struct sc_s {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue