#include <ace/ACE_Memory_Pool.h>
class ACE_Pagefile_Memory_Pool {
public:
typedef ACE_Pagefile_Memory_Pool_Options OPTIONS;
ACE_Pagefile_Memory_Pool ( LPCTSTR backing_store_name = 0, const OPTIONS *options = 0 );
void *init_acquire ( size_t nbytes, size_t &rounded_bytes, int &first_time );
void *acquire (size_t nbytes, size_t &rounded_bytes);
int release (void);
int remap (void *addr);
size_t round_to_page_size (size_t nbytes);
size_t round_to_chunk_size (size_t nbytes);
int sync (ssize_t = -1, int = MS_SYNC);
int sync (void *, size_t, int = MS_SYNC);
int protect (ssize_t = -1, int = PROT_RDWR);
int protect (void *, size_t, int = PROT_RDWR);
inline void dump (void) const;
protected:
int map (int &firstTime, int appendBytes = 0);
int unmap (void);
private:
Control_Block local_cb_;
Control_Block *shared_cb_;
ACE_HANDLE object_handle_;
size_t page_size_;
TCHAR backing_store_name_[MAXPATHLEN];
};
int sync (ssize_t = -1, int = MS_SYNC);
int sync (void *, size_t, int = MS_SYNC);
int protect (ssize_t = -1, int = PROT_RDWR);
int protect (void *, size_t, int = PROT_RDWR);
inline void dump (void) const;