umem 1.0.1
Macros | Functions | Variables
misc.h File Reference
#include "config.h"
#include <sys/types.h>
#include <sys/time.h>
#include "sol_compat.h"
#include <stdarg.h>

Go to the source code of this file.

Macros

#define offsetof(s, m)   ((size_t)(&(((s *)0)->m)))
 
#define ASSERT(assertion)
 

Functions

void debug_printf (const char *format,...)
 
void log_message (const char *format,...)
 
int highbit (ulong_t) __attribute__((pure))
 
int lowbit (ulong_t) __attribute__((pure))
 
void hrt2ts (hrtime_t hrt, timestruc_t *tsp)
 
int print_sym (void *pointer)
 
void umem_printf (const char *format,...)
 
void umem_vprintf (const char *format, va_list)
 
void umem_printf_warn (void *ignored, const char *format,...)
 
void umem_error_enter (const char *)
 
void umem_panic (const char *format,...) __attribute__((noreturn))
 
void umem_err_recoverable (const char *format,...)
 
int __umem_assert_failed (const char *assertion, const char *file, int line) __attribute__((noreturn))
 
void * getfp (void)
 
int getpcstack (uintptr_t *pcstack, int pcstack_limit, int check_sighandler)
 

Variables

uint_t umem_abort
 
uint_t umem_output
 
caddr_t umem_min_stack
 
caddr_t umem_max_stack
 

Macro Definition Documentation

◆ ASSERT

#define ASSERT ( assertion)

◆ offsetof

#define offsetof ( s,
m )   ((size_t)(&(((s *)0)->m)))

Referenced by vmem_no_debug().

Function Documentation

◆ __umem_assert_failed()

int __umem_assert_failed ( const char * assertion,
const char * file,
int line )

References umem_panic().

◆ debug_printf()

void debug_printf ( const char * format,
... )

References UMEM_ERRFD, and UMEM_MAX_ERROR_SIZE.

◆ getfp()

void * getfp ( void )
extern

Referenced by getpcstack().

◆ getpcstack()

int getpcstack ( uintptr_t * pcstack,
int pcstack_limit,
int check_sighandler )
extern

◆ highbit()

int highbit ( ulong_t i)

◆ hrt2ts()

void hrt2ts ( hrtime_t hrt,
timestruc_t * tsp )

References NANOSEC.

◆ log_message()

void log_message ( const char * format,
... )

◆ lowbit()

int lowbit ( ulong_t i)

Referenced by vmem_alloc(), and vmem_xalloc().

◆ print_sym()

int print_sym ( void * pointer)

References umem_printf().

◆ umem_err_recoverable()

void umem_err_recoverable ( const char * format,
... )

◆ umem_error_enter()

void umem_error_enter ( const char * error_str)

◆ umem_panic()

void umem_panic ( const char * format,
... )

◆ umem_printf()

void umem_printf ( const char * format,
... )

References umem_vprintf().

Referenced by print_sym(), and vmem_destroy().

◆ umem_printf_warn()

void umem_printf_warn ( void * ignored,
const char * format,
... )

References umem_vprintf().

◆ umem_vprintf()

void umem_vprintf ( const char * format,
va_list va )

Variable Documentation

◆ umem_abort

uint_t umem_abort
extern

Referenced by umem_err_recoverable().

◆ umem_max_stack

caddr_t umem_max_stack
extern

Referenced by getpcstack(), and umem_startup().

◆ umem_min_stack

caddr_t umem_min_stack
extern

Referenced by getpcstack(), and umem_startup().

◆ umem_output

uint_t umem_output
extern

Referenced by log_message(), and umem_error_enter().