Blender V5.0
system.cc File Reference
#include <climits>
#include <cstdio>
#include <cstdlib>
#include "BLI_math_base.h"
#include "BLI_mutex.hh"
#include "BLI_string.h"
#include "BLI_system.h"
#include <unistd.h>

Go to the source code of this file.

Functions

int BLI_cpu_support_sse2 ()
void BLI_system_backtrace_with_os_info (FILE *fp, const void *)
void BLI_system_backtrace (FILE *fp)
static void __cpuid (int data[4], int selector)
char * BLI_cpu_brand_string ()
int BLI_cpu_support_sse42 ()
void BLI_hostname_get (char *buffer, size_t buffer_maxncpy)
size_t BLI_system_memory_max_in_megabytes ()
int BLI_system_memory_max_in_megabytes_int ()

Function Documentation

◆ __cpuid()

void __cpuid ( int data[4],
int selector )
static

◆ BLI_cpu_brand_string()

char * BLI_cpu_brand_string ( void )

Get CPU brand, result is to be MEM_freeN()-ed.

Definition at line 136 of file system.cc.

References __cpuid(), BLI_strdup(), and result.

◆ BLI_cpu_support_sse2()

int BLI_cpu_support_sse2 ( void )

Definition at line 30 of file system.cc.

◆ BLI_cpu_support_sse42()

int BLI_cpu_support_sse42 ( void )

Definition at line 168 of file system.cc.

References __cpuid(), num, and result.

Referenced by blender::nodes::node_composite_denoise_cc::is_oidn_supported().

◆ BLI_hostname_get()

void BLI_hostname_get ( char * buffer,
size_t buffer_maxncpy )

Obtain the hostname from the system.

This simply determines the host's name, and doesn't do any DNS lookup of any IP address of the machine. As such, it's only usable for identification purposes, and not for reachability over a network.

Parameters
bufferCharacter buffer to write the hostname into.
buffer_maxncpySize of the character buffer, including trailing '\0'.

Definition at line 183 of file system.cc.

References BLI_strncpy().

Referenced by stampdata().

◆ BLI_system_backtrace()

void BLI_system_backtrace ( FILE * fp)

Definition at line 103 of file system.cc.

◆ BLI_system_backtrace_with_os_info()

void BLI_system_backtrace_with_os_info ( FILE * fp,
const void * os_info )

Write a backtrace into a file for systems which support it.

Definition at line 64 of file system.cc.

Referenced by BLI_system_backtrace().

◆ BLI_system_memory_max_in_megabytes()

size_t BLI_system_memory_max_in_megabytes ( void )

Get maximum addressable memory in megabytes.

Definition at line 199 of file system.cc.

Referenced by BLI_system_memory_max_in_megabytes_int().

◆ BLI_system_memory_max_in_megabytes_int()

int BLI_system_memory_max_in_megabytes_int ( void )

Get maximum addressable memory in megabytes (clamped to #INT_MAX).

Definition at line 209 of file system.cc.

References BLI_system_memory_max_in_megabytes(), and min_zz().

Referenced by BKE_blendfile_userdef_from_defaults().