#include <ace/ACE_Memory_Pool.h>
class ACE_Local_Memory_Pool {
public:
typedef ACE_Local_Memory_Pool_Options OPTIONS;
ACE_Local_Memory_Pool ( LPCTSTR backing_store_name = 0, const OPTIONS *options = 0 );
virtual void *init_acquire ( size_t nbytes, size_t &rounded_bytes, int &first_time );
virtual void *acquire (size_t nbytes, size_t &rounded_bytes);
virtual int release (void);
virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
virtual int protect ( void *addr, size_t len, int prot = PROT_RDWR );
virtual void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
protected:
virtual size_t round_up (size_t nbytes);
};
typedef ACE_Local_Memory_Pool_Options OPTIONS;
ACE_Local_Memory_Pool (
LPCTSTR backing_store_name = 0,
const OPTIONS *options = 0
);
virtual void *init_acquire (
size_t nbytes,
size_t &rounded_bytes,
int &first_time
);
virtual void *acquire (size_t nbytes, size_t &rounded_bytes);
virtual int release (void);
virtual int sync (ssize_t len = -1, int flags = MS_SYNC);
len
bytes of the memory region to the backing store
starting at this-
base_addr_. If len
== -1 then sync the
whole region.
virtual int sync (void *addr, size_t len, int flags = MS_SYNC);
len
bytes of the memory region to the backing store
starting at addr_
.
virtual int protect (ssize_t len = -1, int prot = PROT_RDWR);
prot
starting at this-
base_addr_ up to len
bytes. If len
== -1
then change protection of all pages in the mapped region.
virtual int protect (void *addr, size_t len, int prot = PROT_RDWR);
prot
starting at addr
up to len
bytes.
virtual void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
virtual size_t round_up (size_t nbytes);