Blender V5.3
creator.cc File Reference
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "DNA_genfile.h"
#include "BLI_endian_defines.hh"
#include "BLI_fftw.hh"
#include "BLI_path_utils.hh"
#include "BLI_string.hh"
#include "BLI_system.hh"
#include "BLI_task_c.hh"
#include "BLI_threads.hh"
#include "BLI_utildefines.hh"
#include "BKE_appdir.hh"
#include "BKE_blender.hh"
#include "BKE_brush.hh"
#include "BKE_callbacks.hh"
#include "BKE_context.hh"
#include "BKE_cpp_types.hh"
#include "BKE_global.hh"
#include "BKE_idtype.hh"
#include "BKE_material.hh"
#include "BKE_modifier.hh"
#include "BKE_node.hh"
#include "BKE_particle.h"
#include "BKE_shader_fx.hh"
#include "BKE_sound.hh"
#include "BKE_vfont.hh"
#include "BKE_volume.hh"
#include "BLI_args.hh"
#include "DEG_depsgraph.hh"
#include "IMB_imbuf.hh"
#include "MOV_util.hh"
#include "RE_engine.h"
#include "RE_texture.h"
#include "ED_datafiles.h"
#include "SEQ_modifier.hh"
#include "COM_init.hh"
#include "WM_api.hh"
#include "RNA_define.hh"
#include "FN_init.hh"
#include <csignal>
#include "creator_intern.h"
#include "gmp.h"
#include "tbb/scalable_allocator.h"

Go to the source code of this file.

Classes

struct  blender::CreatorAtExitData_EarlyExit
struct  blender::CreatorAtExitData

Namespaces

namespace  blender
 BMesh Iterators.

Functions

GMP Allocator Workaround
void * gmp_alloc (size_t size)
void * gmp_realloc (void *ptr, size_t, size_t new_size)
void gmp_free (void *ptr, size_t)
void gmp_blender_init_allocator ()
Application Level Callbacks

Initialize callbacks for the modules that need them.

static void blender::callback_mem_error (const char *errorStr)
static void blender::main_callback_setup ()
static void blender::callback_main_atexit (void *user_data)
static void blender::callback_clg_fatal (void *fp)
LD_PRELOAD for Linux
static void blender::restore_ld_preload ()
Main Function
int main (int argc, const char **argv)

Variables

Local Application State
ApplicationState blender::app_state

Function Documentation

◆ gmp_alloc()

void * gmp_alloc ( size_t size)

Definition at line 135 of file creator.cc.

References gmp_alloc(), and size().

Referenced by gmp_alloc(), and gmp_blender_init_allocator().

◆ gmp_blender_init_allocator()

void gmp_blender_init_allocator ( )

Use TBB's scalable_allocator on Windows. TBBmalloc correctly captures all allocations already, however, GMP is built with MINGW since it doesn't build with MSVC, which TBB has issues hooking into automatically.

Definition at line 154 of file creator.cc.

References gmp_alloc(), gmp_blender_init_allocator(), gmp_free(), and gmp_realloc().

Referenced by gmp_blender_init_allocator(), and main().

◆ gmp_free()

void gmp_free ( void * ptr,
size_t  )

Definition at line 144 of file creator.cc.

References gmp_free().

Referenced by gmp_blender_init_allocator(), and gmp_free().

◆ gmp_realloc()

void * gmp_realloc ( void * ptr,
size_t ,
size_t new_size )

Definition at line 139 of file creator.cc.

References gmp_realloc().

Referenced by gmp_blender_init_allocator(), and gmp_realloc().

◆ main()

int main ( int argc,
const char ** argv )

Blender's main function responsibilities are:

  • setup subsystems.
  • handle arguments.
  • run #WM_main() event loop, or exit immediately when running in background-mode.

Definition at line 332 of file creator.cc.

References alloc_utf_8_from_16(), blender::app_state, blender::ARG_PASS_ENVIRONMENT, blender::ARG_PASS_FINAL, blender::ARG_PASS_SETTINGS, blender::ARG_PASS_SETTINGS_FORCE, blender::ARG_PASS_SETTINGS_GUI, blender::CreatorAtExitData::ba, blender::BKE_appdir_init(), blender::BKE_appdir_program_path_init(), blender::BKE_blender_atexit_register(), blender::BKE_blender_atexit_unregister(), blender::BKE_blender_globals_init(), blender::BKE_brush_system_init(), blender::BKE_callback_global_init(), blender::BKE_cpp_types_init(), blender::BKE_idtype_init(), blender::BKE_materials_init(), blender::BKE_modifier_init(), blender::BKE_particle_init_rng(), blender::BKE_shaderfx_init(), blender::BKE_sound_force_device(), blender::BKE_sound_init_once(), blender::BKE_vfont_builtin_register(), blender::BKE_volumes_init(), blender::BLI_args_create(), blender::BLI_args_parse(), BLI_assert, BLI_assert_unreachable, blender::BLI_setenv_if_new(), blender::BLI_system_max_open_files_ensure(), blender::BLI_task_scheduler_init(), blender::BLI_threadapi_init(), build_commit_date, build_commit_time, build_commit_timestamp, blender::CreatorAtExitData_EarlyExit::C, C, blender::callback_clg_fatal(), blender::callback_main_atexit(), blender::CCL_implicit_sharing_init(), blender::CCL_log_init(), CLG_fatal_fn_set(), CLG_init(), CLG_output_use_basename_set(), CLG_output_use_memory_set(), CLG_output_use_source_set(), CLG_output_use_timestamp_set(), blender::CTX_create(), datatoc_bfont_pfb, datatoc_bfont_pfb_size, blender::DEG_register_node_types(), blender::CreatorAtExitData::early_exit, blender::FRS_init(), blender::FRS_set_context(), G, GHOST_HACK_getFirstFile(), gmp_blender_init_allocator(), blender::IMB_init(), blender::compositor::init(), blender::fftw::initialize_float(), libmv_initLogging(), main, blender::ApplicationState::main_arg_deferred, blender::main_arg_deferred_free(), blender::main_arg_deferred_handle(), blender::main_args_handle_load_file(), blender::main_args_setup(), blender::main_callback_setup(), blender::main_signal_setup(), blender::main_signal_setup_background(), MEM_init_memleak_detection(), MEM_use_guarded_allocator(), blender::seq::modifiers_init(), blender::MOV_init(), blender::bke::node_system_init(), printf, blender::RE_engines_init(), blender::RE_texture_rng_init(), blender::fn::multi_function::register_common_functions(), blender::restore_ld_preload(), blender::RNA_init(), STR_ELEM, STREQ, blender::STRNCPY(), STRPREFIX, blender::WM_exit(), blender::WM_init(), blender::WM_init_splash_on_startup(), and blender::WM_main().