BRL-CAD
Loading...
Searching...
No Matches
global.h File Reference
#include "common.h"
#include "vmath.h"
#include "rt/defines.h"
Include dependency graph for global.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

struct bu_list rt_vlfree
 
struct resource rt_uniresource
 

Detailed Description

Todo:
  • rather than completely eliminating the rt_vlfree global, a better approach might be to make it optional - i.e., have our code fall back on it automatically if a user doesn't supply their own vlfree. That would allow user code to "just work" in all cases, but allow applications to manage their vlfree containers if they so choose (right now, once vlist memory is allocated, it generally gets added to rt_vlfree and memory usage grows until the app is shut down. This may be fine, but if an app wants to discard their vlfree memory for a particular use case to reduce memory footprint, or use different vlfree lists for multithreading situations, they should be able to manage their own vlfree to do so:

struct bu_list usr_vlfree; BU_LIST_INIT(&usr_vlfree);

rt_uniresource is a similar case in point - the convenience is very useful, but there are situations where applications want/need to manage their own resources for more demanding scenarios.

NOTE for developers - for library initialization reasons, the globals documented here are located in the source file src/librt/rt_init.cpp

Definition in file global.h.

Variable Documentation

◆ rt_vlfree

struct bu_list rt_vlfree
extern

Definitions for librt.a which are global to the library regardless of how many different models are being worked on Global container for holding reusable vlist elements. This is an acceleration mechanism for things like GED drawing, which would otherwise need to (re)allocate massive numbers of individual vlists.

◆ rt_uniresource

struct resource rt_uniresource
extern