14 #ifndef STXXL_MEM_FILE_HEADER
15 #define STXXL_MEM_FILE_HEADER
17 #include <stxxl/bits/io/disk_queued_file.h>
18 #include <stxxl/bits/io/request.h>
21 __STXXL_BEGIN_NAMESPACE
36 int queue_id = DEFAULT_QUEUE,
int allocator_id = NO_ALLOCATOR) :
disk_queued_file(queue_id, allocator_id), ptr(NULL), sz(0)
38 void serve(
const request * req)
throw (io_error);
51 #endif // !STXXL_MEM_FILE_HEADER
Implementation of file based on new[] and memcpy.
Definition: mem_file.h:27
void set_size(offset_type newsize)
Changes the size of the file.
Definition: mem_file.cpp:63
Request with basic properties like file and offset.
Definition: request.h:39
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 regi...
Definition: mem_file.cpp:70
void lock()
Locks file for reading and writing (acquires a lock in the file system)
Definition: mem_file.cpp:53
const char * io_type() const
Identifies the type of I/O implementation.
Definition: mem_file.cpp:42
offset_type size()
Returns size of the file.
Definition: mem_file.cpp:58
mem_file(int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR)
constructs file object
Definition: mem_file.h:35
Implementation of some file methods based on serving_request.
Definition: disk_queued_file.h:26