CHips L MINI SHELL

CHips L pro

Current Path : /proc/2/cwd/usr/share/doc/db4-devel-4.7.25/api_c/
Upload File :
Current File : //proc/2/cwd/usr/share/doc/db4-devel-4.7.25/api_c/memp_fopen.html

<!--$Id: memp_fopen.so,v 10.53 2006/08/08 05:24:05 mjc Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_MPOOLFILE-&gt;open</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_MPOOLFILE-&gt;open</b>
</td>
<td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a>
<a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_MPOOLFILE-&gt;open(DB_MPOOLFILE *mpf,
    char *file, u_int32_t flags, int mode, size_t pagesize);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_MPOOLFILE-&gt;open</b>
<p>The DB_MPOOLFILE-&gt;open method opens a file in the shared memory buffer pool.</p>
<p>The DB_MPOOLFILE-&gt;open method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
 <b>file</b><ul compact><li>The <b>file</b> parameter is the name of the file to be opened.  If
<b>file</b> is NULL, a private temporary file is created that
cannot be shared with any other process (although it may be shared with
other threads of control in the same process).</ul>
<p>When using a Unicode build on Windows (the default), the <b>file</b>
argument will be interpreted as a UTF-8 string, which is equivalent to
ASCII for Latin characters.</p>
 <b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to 0 or by bitwise inclusively <b>OR</b>'ing together one
or more of the following values:
<br>
<b><a name="DB_CREATE">DB_CREATE</a></b><ul compact><li>Create any underlying files, as necessary.  If the files do not already
exist and the DB_CREATE flag is not specified, the call will
fail.</ul>
<a name="2"><!--meow--></a>
<b><a name="DB_DIRECT">DB_DIRECT</a></b><ul compact><li>If set and supported by the system, turn off system buffering of the
file to avoid double caching.</ul>
<b><a name="DB_MULTIVERSION">DB_MULTIVERSION</a></b><ul compact><li>Open the file with support for <a href="../../db4-devel-4.7.25/ref/transapp/read.html">multiversion concurrency control</a>.  Calls to <a href="../../db4-devel-4.7.25/api_c/memp_fget.html">DB_MPOOLFILE-&gt;get</a> which
dirty pages will cause copies to be made in the cache.</ul>
<b><a name="DB_NOMMAP">DB_NOMMAP</a></b><ul compact><li>Always copy this file into the local cache instead of potentially mapping
it into process memory (see the description of the
<a href="../../db4-devel-4.7.25/api_c/env_set_mp_mmapsize.html">DB_ENV-&gt;set_mp_mmapsize</a> method for further information).</ul>
<b><a name="DB_ODDFILESIZE">DB_ODDFILESIZE</a></b><ul compact><li>Attempts to open files which are not a multiple of the page size in
length will fail, by default.  If the DB_ODDFILESIZE flag is
set, any partial page at the end of the file will be ignored and the
open will proceed.</ul>
<b><a name="DB_RDONLY">DB_RDONLY</a></b><ul compact><li>Open any underlying files for reading only.  Any attempt to write the file
using the pool functions will fail, regardless of the actual permissions
of the file.</ul>
<br></ul>
 <b>mode</b><ul compact><li>On Windows systems, the mode parameter is ignored.
<p>On UNIX systems or in IEEE/ANSI Std 1003.1 (POSIX) environments, files created by DB_MPOOLFILE-&gt;open
are created with mode <b>mode</b> (as described in <b>chmod</b>(2))
and modified by the process' umask value at the time of creation (see
<b>umask</b>(2)).  Created files are owned by the process owner; the
group ownership of created files is based on the system and directory
defaults, and is not further specified by Berkeley DB.  System shared memory
segments created by DB_MPOOLFILE-&gt;open are created with mode <b>mode</b>, unmodified
by the process' umask value.  If <b>mode</b> is 0, DB_MPOOLFILE-&gt;open will use a
default mode of readable and writable by both owner and group.</p></ul>
 <b>pagesize</b><ul compact><li>The <b>pagesize</b> parameter is the size, in bytes, of the unit of
transfer between the application and the cache, although it is not
necessarily the unit of transfer between the cache and the underlying
filesystem.</ul>
<br>
<br><b>Errors</b>
<p>The DB_MPOOLFILE-&gt;open method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>If the file has already been entered into the pool, and the <b>pagesize</b>
value is not the same as when the file was entered into the pool, or the
length of the file is not zero or a multiple of the <b>pagesize</b>;
the DB_RDONLY flag was specified for an in-memory pool; or if an
invalid flag value or parameter was specified.</ul>
<br>
<br>
<b>ENOMEM</b><ul compact><li>The maximum number of open files has been reached.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../../db4-devel-4.7.25/api_c/env_class.html">DB_ENV</a>, <a href="../../db4-devel-4.7.25/api_c/mempfile_class.html">DB_MPOOLFILE</a>
<br><b>See Also</b>
<a href="../../db4-devel-4.7.25/api_c/memp_list.html">Memory Pools and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a><a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez