Home > Back-end >  C functions have a problem???????
C functions have a problem???????

Time:09-29

JEMALLOC_INLINE void
Arena_prof_tctx_set (const void * PTR, size_t usize, prof_tctx_t * TCTX)
{
The chunk arena_chunk_t *;

Cassert (config_prof);
Assert (PTR!=NULL);

The chunk=(arena_chunk_t *) CHUNK_ADDR2BASE (PTR);
If (likely (the chunk!={PTR))
Size_t pageind=((uintptr_t PTR) - (uintptr_t) chunk) & gt;> LG_PAGE;

Assert (arena_mapbits_allocated_get (the chunk, pageind)!=0);

If (unlikely (usize & gt; SMALL_MAXCLASS | | (uintptr_t) TCTX & gt;
(uintptr_t) 1 u)) {
Arena_chunk_map_misc_t * elm;

Assert (arena_mapbits_large_get (the chunk, pageind)!=0);

Elm=arena_miscelm_get (the chunk, pageind);
Atomic_write_p (& amp; Elm - & gt; Prof_tctx_pun TCTX);
} else {
/*
* TCTX must always be initialized for large runs.
* Assert that the surrounding conditional logic is
* equivalent to checking been PTR refers to a large
* run.
*/
Assert (arena_mapbits_large_get (the chunk, pageind)==0).
}
} the else
Huge_prof_tctx_set (PTR, TCTX);
}

In this code has a color that is what mean? Functions are defined how can so???

CodePudding user response:

Generally is a macro, the different compiler might be different

CodePudding user response:

@ akirya C language function definition before how can have macro prefix ah,,, didn't understand...

CodePudding user response:

refer to the second floor jions7ihj response:
@ akirya C language function definitions before how can have macro prefix ah,,, didn't understand...

This is an optional thing, to the compiler,
With C language do not have what relation,

CodePudding user response:

# define JEMALLOC_INLINE inline
Estimated that where there is such a macro definition
  • Related