#include <bu.h>
Collaboration diagram for bu_mapped_file:
Data Fields | |
bu_list | l |
char * | name |
bu_strdup() of file name | |
genptr_t | buf |
In-memory copy of file (may be mmapped). | |
long | buflen |
# bytes in 'buf' | |
int | is_mapped |
1=mmap() used, 0=bu_malloc/fread | |
char * | appl |
bu_strdup() of tag for application using 'apbuf' | |
genptr_t | apbuf |
opt: application-specific buffer | |
long | apbuflen |
opt: application-specific buflen | |
long | modtime |
date stamp, in case file is modified | |
int | uses |
# ptrs to this struct handed out | |
int | dont_restat |
1=on subsequent opens, don't re-stat() |
Before allocating apbuf and performing data conversion into it, openers should check to see if the file has already been opened and converted previously.
When used in RT, the mapped files are not closed at the end of a frame, so that subsequent frames may take advantage of the large data files having already been read and converted. Examples include EBMs, texture maps, and height fields.
For appl == "db_i", file is a ".g" database & apbuf is (struct db_i *).
Definition at line 1070 of file bu.h.
|
Definition at line 1071 of file bu.h. Referenced by bu_free_mapped_files(), and bu_open_mapped_file(). |
|
bu_strdup() of file name
Definition at line 1072 of file bu.h. Referenced by bu_free_mapped_files(), bu_open_mapped_file(), and bu_pr_mapped_file(). |
|
In-memory copy of file (may be mmapped).
Definition at line 1073 of file bu.h. Referenced by bu_free_mapped_files(), bu_open_mapped_file(), db_open(), rt_ebm_import(), rt_ebm_import5(), rt_hf_import(), and rt_mk_binunif(). |
|
# bytes in 'buf'
Definition at line 1074 of file bu.h. Referenced by bu_free_mapped_files(), bu_open_mapped_file(), db5_scan(), db_open(), rt_ebm_import(), rt_ebm_import5(), and rt_hf_import(). |
|
1=mmap() used, 0=bu_malloc/fread
Definition at line 1075 of file bu.h. Referenced by bu_free_mapped_files(), and bu_open_mapped_file(). |
|
bu_strdup() of tag for application using 'apbuf'
Definition at line 1076 of file bu.h. Referenced by bu_free_mapped_files(), and bu_open_mapped_file(). |
|
opt: application-specific buffer
Definition at line 1077 of file bu.h. Referenced by bu_free_mapped_files(), db_open(), rt_ebm_import(), rt_ebm_import5(), rt_hf_import(), rt_hf_plot(), and rt_hf_prep(). |
|
opt: application-specific buflen
Definition at line 1078 of file bu.h. Referenced by rt_ebm_import(), rt_ebm_import5(), and rt_hf_import(). |
|
date stamp, in case file is modified
Definition at line 1079 of file bu.h. Referenced by bu_open_mapped_file(). |
|
# ptrs to this struct handed out
Definition at line 1080 of file bu.h. Referenced by bu_close_mapped_file(), bu_free_mapped_files(), bu_open_mapped_file(), rt_dsp_prep(), and rt_hf_prep(). |
|
1=on subsequent opens, don't re-stat()
Definition at line 1081 of file bu.h. Referenced by rt_submodel_prep(). |