TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::LibraryAllocator Namespace Reference

Where the text and SVG libraries (HarfBuzz, skribidi, SheenBidi, nanosvg) get their memory: the C heap, or a host's allocation hooks while a route is in place. More...

Classes

class  HeapScope
 While one lives, what the libraries allocate on this thread comes from the C heap, even with a route in place. More...

Typedefs

using RouteHandle = const void*
 A route, as Route returns it; null when nothing was routed.

Functions

RouteHandle Route (const AllocationHooks &hooks)
 From now on the libraries allocate through hooks.
void Unroute (RouteHandle route)
 Back to the C heap, if route is still the one in place.
bool IsRouted ()
 Whether the libraries allocate through hooks right now.

Detailed Description

Where the text and SVG libraries (HarfBuzz, skribidi, SheenBidi, nanosvg) get their memory: the C heap, or a host's allocation hooks while a route is in place.

Typedef Documentation

◆ RouteHandle

A route, as Route returns it; null when nothing was routed.

Function Documentation

◆ Route()

RouteHandle tachyon::LibraryAllocator::Route ( const AllocationHooks & hooks)

From now on the libraries allocate through hooks.

Returns null when hooks is not set, or when too many different hooks were routed in this process already.

◆ Unroute()

void tachyon::LibraryAllocator::Unroute ( RouteHandle route)

Back to the C heap, if route is still the one in place.

Blocks made through its hooks are still freed by them, so the hooks must outlive those blocks.

◆ IsRouted()

bool tachyon::LibraryAllocator::IsRouted ( )

Whether the libraries allocate through hooks right now.