Implementation of file based on new[] and memcpy. More...
#include <mem_file.h>


Public Member Functions | |
| mem_file (int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR) | |
| constructs file object | |
| void | serve (const request *req) throw (io_error) |
| offset_type | size () |
| Returns size of the file. | |
| void | set_size (offset_type newsize) |
| Changes the size of the file. | |
| void | lock () |
| Locks file for reading and writing (acquires a lock in the file system). | |
| void | discard (offset_type offset, offset_type size) |
| Discard a region of the file (mark it unused) some specialized file types may need to know freed regions. | |
| const char * | io_type () const |
| Identifies the type of I/O implementation. | |
Implementation of file based on new[] and memcpy.
| mem_file::mem_file | ( | int | queue_id = DEFAULT_QUEUE, |
|
| int | allocator_id = NO_ALLOCATOR | |||
| ) | [inline] |
constructs file object
| disk | disk(file) identifier |
| void mem_file::discard | ( | offset_type | offset, | |
| offset_type | size | |||
| ) | [virtual] |
Discard a region of the file (mark it unused) some specialized file types may need to know freed regions.
Reimplemented from file.
| const char * mem_file::io_type | ( | ) | const [virtual] |
Identifies the type of I/O implementation.
Reimplemented from file.
| void mem_file::lock | ( | ) | [virtual] |
Locks file for reading and writing (acquires a lock in the file system).
Implements file.
| void mem_file::set_size | ( | offset_type | newsize | ) | [virtual] |
| file::offset_type mem_file::size | ( | ) | [virtual] |
1.7.1