This module provides memory mapping facilities that allow a user to map files into the virtual address space of the process. There are various options that can be used when mapping a file into memory, such as copy on write. Not all of these options are available on all platforms, hymmap_capabilities provides the list of supported options. Note also that on some platforms memory mapping facilites do not exist at all. On these platforms the API will still be available, but will simply read the file into allocated memory.
#include <windows.h>
#include "hyport.h"
Functions | |
void *VMCALL | hymmap_map_file (struct HyPortLibrary *portLibrary, const char *path, void **handle) |
Map a file into memory. | |
void VMCALL | hymmap_unmap_file (struct HyPortLibrary *portLibrary, void *handle) |
UnMap previously mapped memory. | |
void VMCALL | hymmap_shutdown (struct HyPortLibrary *portLibrary) |
PortLibrary shutdown. | |
I_32 VMCALL | hymmap_startup (struct HyPortLibrary *portLibrary) |
PortLibrary startup. | |
I_32 VMCALL | hymmap_capabilities (struct HyPortLibrary *portLibrary) |
Check the capabilities available for HYMMAP at runtime for the current platform. |
I_32 VMCALL hymmap_capabilities | ( | struct HyPortLibrary * | portLibrary | ) |
Check the capabilities available for HYMMAP at runtime for the current platform.
[in] | portLibrary | The port library |
void* VMCALL hymmap_map_file | ( | struct HyPortLibrary * | portLibrary, | |
const char * | path, | |||
void ** | handle | |||
) |
Map a file into memory.
[in] | portLibrary | The port library |
[in] | path | - the path of the file to mapped into memory. |
[out] | handle | - updates *handle with the memory map handle, this handle is later passed to unmap. |
void VMCALL hymmap_shutdown | ( | struct HyPortLibrary * | portLibrary | ) |
PortLibrary shutdown.
[in] | portLibrary | The port library |
I_32 VMCALL hymmap_startup | ( | struct HyPortLibrary * | portLibrary | ) |
PortLibrary startup.
This function is called during startup of the portLibrary. Any resources that are required for the memory mapping operations may be created here. All resources created here should be destroyed in hymmap_shutdown.
[in] | portLibrary | The port library |
void VMCALL hymmap_unmap_file | ( | struct HyPortLibrary * | portLibrary, | |
void * | handle | |||
) |
UnMap previously mapped memory.
[in] | portLibrary | The port library |
[in] | handle | - the handle from the mmap_map_file. |
Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.