1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
ULib/include/ulib/debug/common.h
stefanocasazza cb3ff25402 fix+brotli
2017-09-28 16:51:51 +02:00

45 lines
1.1 KiB
C

// ============================================================================
//
// = LIBRARY
// ULib - c++ library
//
// = FILENAME
// common.h
//
// = AUTHOR
// Stefano Casazza
//
// ============================================================================
#ifndef ULIB_DEBUG_COMMON_H
#define ULIB_DEBUG_COMMON_H 1
#include <ulib/internal/common.h>
#include <ulib/internal/error.h>
#ifdef DEBUG
U_EXPORT void u_debug_print_info();
U_EXPORT void u_debug_exit(int exit_value);
U_EXPORT pid_t u_debug_fork( pid_t pid, int trace_active);
U_EXPORT pid_t u_debug_vfork(pid_t pid, int trace_active);
U_EXPORT void u_debug_exec(const char* pathname, char* const argv[], char* const envp[], int trace_active) __noreturn;
// u_debug_set_memlimit() uses setrlimit() to restrict dynamic memory allocation.
// The argument to set_memlimit() is the limit in megabytes (a floating-point number)
U_EXPORT void u_debug_set_memlimit(float size);
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef DEBUG
U_EXPORT void u_debug_init(void);
#endif
U_EXPORT void u_debug_at_exit(void);
#ifdef __cplusplus
}
#endif
#endif