openTRI 0.1
Functions
VRAM MMU

Functions

triVoid * vrelptr (triVoid *ptr)
 Make a pointer relative to VRAM base. More...
 
triVoid * vabsptr (triVoid *ptr)
 Make a pointer absolute (useable by CPU). More...
 
triVoid * triVAlloc (triU32 size)
 Allocate memory from VRAM. More...
 
triVoid triVFree (triVoid *ptr)
 Free allocated memory from VRAM. More...
 
triU32 triVMemavail ()
 Return remaining unallocated VRAM. More...
 
triU32 triVLargestblock ()
 Return largest free memory block in VRAM. More...
 

Detailed Description

Function Documentation

◆ vrelptr()

triVoid * vrelptr ( triVoid *  ptr)

Make a pointer relative to VRAM base.

Note
A relative NULL pointer is NOT illegal!
Parameters
ptr- Pointer to make relative
Returns
relative pointer matching ptr

◆ vabsptr()

triVoid * vabsptr ( triVoid *  ptr)

Make a pointer absolute (useable by CPU).

Note
A relative NULL pointer is NOT illegal!
Parameters
ptr- Pointer to make absolute
Returns
absolute pointer matching ptr

◆ triVAlloc()

triVoid * triVAlloc ( triU32  size)

Allocate memory from VRAM.

Parameters
size- Number of bytes to allocate
Returns
absolute pointer on success, NULL on failure

◆ triVFree()

triVoid triVFree ( triVoid *  ptr)

Free allocated memory from VRAM.

Parameters
ptr- Previously allocated pointer

◆ triVMemavail()

triU32 triVMemavail ( )

Return remaining unallocated VRAM.

Returns
Size of remaining VRAM in bytes

◆ triVLargestblock()

triU32 triVLargestblock ( )

Return largest free memory block in VRAM.

Returns
Size of largest free block in bytes