QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
defspace_s Struct Reference

Represent a block of memory in the progs data space. More...

Collaboration diagram for defspace_s:
[legend]

Data Fields

pr_type_tdata
 backing memory for this space More...
 
struct def_s ** def_tail
 for appending to defs More...
 
struct def_sdefs
 list of defs using this space More...
 
struct locref_s * free_locs
 list of free blocks in this space More...
 
int(* grow )(struct defspace_s *space)
 Grow the backing memory of the defspace. More...
 
int max_size
 size of backing memory More...
 
struct defspace_snext
 for ALLOC More...
 
int qfo_space
 index to space in qfo spaces More...
 
int size
 current high-water mark for alloced data More...
 
ds_type_t type
 basic type of defspace More...
 

Detailed Description

Represent a block of memory in the progs data space.

Field Documentation

pr_type_t* data

backing memory for this space

struct def_s** def_tail

for appending to defs

struct def_s* defs

list of defs using this space

struct locref_s* free_locs

list of free blocks in this space

int(* grow)(struct defspace_s *space)

Grow the backing memory of the defspace.

This function is called when more memory is needed for the space. The default grow function for ds_backed defspaces expands the backing memory by 1024 pr_type_t words and initializes them to 0. Other defspace types do not actually allocate backing memory as it is not needed. If null, more space cannot be allocated and an internal error will be generated.

Parameters
spaceThis defspace.
Returns
1 for success, 0 for failure. On failure, an internal error will be generated.
Note
Setting to null forces failure and thus an internal error.
int max_size

size of backing memory

struct defspace_s* next

for ALLOC

int qfo_space

index to space in qfo spaces

int size

current high-water mark for alloced data

ds_type_t type

basic type of defspace


The documentation for this struct was generated from the following file: